Skip to content

Commit 54c487a

Browse files
committed
sstbatcher: pass unix nanos when computing stats
Previously, when regenerating stats from a split, we passed unix seconds to the stats calculation routine instead of unix nanoseconds. This is incorrect, but doesn't seem to have any observable impact on behavior since the time is used to estimate the age of garbage. The SST batcher cannot calculate garbage age bytes since it is missing the previous value and therefore does not know the size of the value. Issue: none Release note: none
1 parent c1e847b commit 54c487a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/kv/bulk/sst_adder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ func addStatsToSplitTables(left, right, original *sstSpan, sendStartTimestamp ti
345345
return err
346346
}
347347
statsIter.SeekGE(storage.MVCCKey{Key: right.start})
348-
right.stats, err = storage.ComputeStatsForIter(statsIter, sendStartTimestamp.Unix())
348+
right.stats, err = storage.ComputeStatsForIter(statsIter, sendStartTimestamp.UnixNano())
349349
statsIter.Close()
350350
if err != nil {
351351
return err

0 commit comments

Comments
 (0)