Skip to content

Commit

Permalink
fix: add additional logging on loading fields.idxl files (#25309)
Browse files Browse the repository at this point in the history
Log the path of the file being loaded, and when level=debug
log progress fpr each set of field changes

closes #25289

(cherry picked from commit 5d8d112)

closes #25310
  • Loading branch information
davidby-influx committed Sep 12, 2024
1 parent ee51e5c commit a84e3be
Showing 1 changed file with 9 additions and 1 deletion.
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

0 comments on commit a84e3be

Please sign in to comment.