Skip to content

Commit

Permalink
add check for lazy download to delete
Browse files Browse the repository at this point in the history
Signed-off-by: Alibi Shalgymbay <aliby.bbb@gmail.com>
  • Loading branch information
bodevone committed Aug 6, 2024
1 parent efa7ba3 commit 944a14e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/block/indexheader/lazy_binary_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -368,6 +368,10 @@ func (r *LazyBinaryReader) deleteIfIdleSince(ts int64) error {
// isIdleForDeleteSince returns true if the reader is idle since given time (as unix nano), unloaded
// and index header file is present.
func (r *LazyBinaryReader) isIdleForDeleteSince(ts int64) bool {
if !r.lazyDownload {
return false
}

if r.usedAt.Load() > ts {
return false
}
Expand Down

0 comments on commit 944a14e

Please sign in to comment.