Skip to content

Commit

Permalink
review suggestion
Browse files Browse the repository at this point in the history
Co-authored-by: Peter Vlugter <[email protected]>
  • Loading branch information
patriknw and pvlugter authored Jan 7, 2025
1 parent 9a60b78 commit e5ea857
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@ private[projection] object R2dbcOffsetStore {
// Slice will be equal, and pid will compare lexicographically less than any valid pid
val untilRecord = Record(slice, "", 0, until)
// this will always keep at least one, latest per slice
val newerRecords = recordsSortedByTimestamp.rangeImpl(Some(untilRecord), None) // inclusive of until
val olderRecords = recordsSortedByTimestamp.rangeImpl(None, Some(untilRecord)) // exclusive of until
val newerRecords = recordsSortedByTimestamp.rangeFrom(untilRecord) // inclusive of until
val olderRecords = recordsSortedByTimestamp.rangeUntil(untilRecord) // exclusive of until
val filteredOlder = olderRecords.filterNot(ableToEvictRecord)

if (filteredOlder.size == olderRecords.size) recordsSortedByTimestamp
Expand Down

0 comments on commit e5ea857

Please sign in to comment.