Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
linasm committed Oct 6, 2021
1 parent 0a65bd3 commit 4c5005f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/dbnode/storage/entry.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ func (entry *Entry) IndexedForBlockStart(indexBlockStart xtime.UnixNano) bool {
}

// IndexedRange returns minimum and maximum blockStart values covered by index entry.
// Note that there may be uncovered gaps within that range.
// The range is inclusive. Note that there may be uncovered gaps within the range.
// Returns (0, 0) for an empty range.
func (entry *Entry) IndexedRange() (xtime.UnixNano, xtime.UnixNano) {
entry.reverseIndex.RLock()
defer entry.reverseIndex.RUnlock()

return entry.reverseIndex.indexedRangeWithRLock()
min, max := entry.reverseIndex.indexedRangeWithRLock()
entry.reverseIndex.RUnlock()
return min, max
}

// NeedsIndexUpdate returns a bool to indicate if the Entry needs to be indexed
Expand Down
2 changes: 1 addition & 1 deletion src/m3ninx/doc/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ type OnIndexSeries interface {
IndexedForBlockStart(blockStart xtime.UnixNano) bool

// IndexedRange returns minimum and maximum blockStart values covered by index entry.
// Note that there may be uncovered gaps within that range.
// The range is inclusive. Note that there may be uncovered gaps within the range.
// Returns (0, 0) for an empty range.
IndexedRange() (xtime.UnixNano, xtime.UnixNano)
}

0 comments on commit 4c5005f

Please sign in to comment.