Skip to content

Commit

Permalink
rangeFrom and rangeUntil
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 Nov 26, 2024
1 parent c459e40 commit 8b5e3d3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ private[projection] object DynamoDBOffsetStore {
// Records comparing < this record by recordOrdering are subject to eviction
// Slice will be equal, and pid will compare lexicographically less than any valid pid
val untilRecord = Record(slice, "", 0, until)
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 8b5e3d3

Please sign in to comment.