Skip to content

Commit

Permalink
storegateway: fix code comments
Browse files Browse the repository at this point in the history
Signed-off-by: Vladimir Varankin <vladimir.varankin@grafana.com>
  • Loading branch information
narqo committed Jun 18, 2024
1 parent 0e9bfb4 commit bb71216
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/storegateway/bucket.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ func (s *BucketStore) syncBlocks(ctx context.Context, initialSync bool) error {
level.Info(s.logger).Log("msg", "dropped outdated block", "block", id)
}

// Start snapshotter in the end of the sync, but do that only once per BucketStore's life time.
// Start snapshotter in the end of the sync, but do that only once per BucketStore's lifetime.
// We do that here so the snapshotter watched after blocks from both initial sync and those discovered later.
var err error
s.snapshotterStartOnce.Do(func() {
Expand Down
3 changes: 1 addition & 2 deletions pkg/storegateway/indexheader/snapshotter.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,7 @@ func (s *Snapshotter) RestoreLoadedBlocks() map[ulid.ULID]int64 {
err := loadIndexHeadersSnapshot(fileName, &snapshot)
if err != nil {
if os.IsNotExist(err) {
// We didn't find the snapshot. Could be because we crashed after restoring it last time
// or because the previous binary didn't support eager loading.
// We didn't find the snapshot. Could be because the previous binary didn't support eager loading.
return nil
}
level.Warn(s.logger).Log(
Expand Down

0 comments on commit bb71216

Please sign in to comment.