Skip to content

Commit 7980719

Browse files
committed
chore: adding comment
1 parent 2a162d4 commit 7980719

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

internal/cache/badger/badger.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ type hasher interface {
3737
)
3838
GetKeysByHashRangeWithIndexes(keys []string) (
3939
map[uint32][]string, // itemsByHashRange
40-
map[string]int, // indexes
40+
map[string]int, // indexes
4141
error,
4242
)
4343
}
@@ -181,6 +181,8 @@ func (c *Cache) Put(keys []string, ttl time.Duration) error {
181181
}
182182

183183
// CreateSnapshots writes the cache contents to the provided writers
184+
// TODO CreateSnapshots should take an optional "since" parameter that the node service that infer from the filenames on S3
185+
// Otherwise the current "since" will be lost after a node restart.
184186
func (c *Cache) CreateSnapshots(ctx context.Context, w map[uint32]io.Writer) (uint64, error) {
185187
c.snapshottingLock.Lock()
186188
if c.snapshotting {

0 commit comments

Comments
 (0)