Skip to content

Commit 46086c8

Browse files
fix: add additional logging on loading fields.idxl files (#25309) (#25319) (#25324)
Log the path of the file being loaded, and when level=debug log progress for each set of field changes closes #25289 (cherry picked from commit 5d8d112) closes #25311 (cherry picked from commit 96c97a7) closes #25313
1 parent f302d97 commit 46086c8

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tsdb/shard.go

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2499,7 +2499,15 @@ func (fscm *measurementFieldSetChangeMgr) loadAllFieldChanges(log *zap.Logger) (
24992499
return nil
25002500
}
25012501
})()
2502+
changesetCount := 0
2503+
totalChanges := 0
25022504
for fcs, err = fscm.loadFieldChangeSet(fd); err == nil; fcs, err = fscm.loadFieldChangeSet(fd) {
2505+
totalChanges += len(fcs)
2506+
changesetCount++
2507+
log.Debug("loading field change set",
2508+
zap.Int("set", changesetCount),
2509+
zap.Int("changes", len(fcs)),
2510+
zap.Int("total_changes", totalChanges))
25032511
changes = append(changes, fcs)
25042512
}
25052513
if errors.Is(err, io.EOF) {
@@ -2543,7 +2551,7 @@ func (fscm *measurementFieldSetChangeMgr) loadFieldChangeSet(r io.Reader) (Field
25432551
}
25442552

25452553
func (fs *MeasurementFieldSet) ApplyChanges() error {
2546-
log, end := logger.NewOperation(context.TODO(), fs.changeMgr.logger, "loading changes", "field indices")
2554+
log, end := logger.NewOperation(context.TODO(), fs.changeMgr.logger, "loading changes", "field indices", zap.String("path", fs.changeMgr.changeFilePath))
25472555
defer end()
25482556
changes, err := fs.changeMgr.loadAllFieldChanges(log)
25492557
if err != nil {

0 commit comments

Comments
 (0)