[core] fix the collect of overlapped snapshots
Purpose
When call findOverlappedSnapshots(List<Snapshot> taggedSnapshots, long beginInclusive, long endExclusive).
If beginInclusive is 10, endExclusive is 15, the range is [10, 15), and the taggedSnapshots is [8, 9, 11, 12, 15].
In previous way, the overlapped snapshots is [9, 11, 12]. Actually is only [11, 12].
Tests
API and Format
Documentation
Hi @askwang , can you add test cases?
Hi @askwang , can you add test cases?
test added.
@JingsongLi can you help take a look, ths
Hi @askwang
Please try not to modify the code solely based on its naming. Instead, identify issues through practical application, as the naming of the code may simply be a previous naming error.
This should include 'previous', which is the safe boundary for checking.