Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add additional logging on loading fields.idxl files #25309

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion tsdb/shard.go
Original file line number Diff line number Diff line change
Expand Up @@ -2243,7 +2243,15 @@ func (fscm *measurementFieldSetChangeMgr) loadAllFieldChanges(log *zap.Logger) (
return nil
}
})()
changesetCount := 0
totalChanges := 0
for fcs, err = fscm.loadFieldChangeSet(fd); err == nil; fcs, err = fscm.loadFieldChangeSet(fd) {
totalChanges += len(fcs)
changesetCount++
log.Debug("loading field change set",
zap.Int("set", changesetCount),
zap.Int("changes", len(fcs)),
zap.Int("total_changes", totalChanges))
changes = append(changes, fcs)
}
if errors.Is(err, io.EOF) {
Expand Down Expand Up @@ -2287,7 +2295,7 @@ func (fscm *measurementFieldSetChangeMgr) loadFieldChangeSet(r io.Reader) (Field
}

func (fs *MeasurementFieldSet) ApplyChanges() error {
log, end := logger.NewOperation(fs.changeMgr.logger, "loading changes", "field indices")
log, end := logger.NewOperation(fs.changeMgr.logger, "loading changes", "field indices", zap.String("path", fs.changeMgr.changeFilePath))
defer end()
changes, err := fs.changeMgr.loadAllFieldChanges(log)
if err != nil {
Expand Down