Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
searchkit/constraints: rewrite of binary search algorithm
Implemented a new binary search algorithm that no longer needs filemarkers or knowing the lines beforehand, which reduces the time spent applying a SearchConstraintSearchSince to a file, especially if the file is large in size. Removed the following classes which are no longer necessary: - SkipRange - SkipRangeOverlapException - BinarySearchState - FileMarkers (and respective unit tests) - SeekInfo Removed `test_logs_since_junk_not_allow_unverifiable` test case since we're no longer parsing all lines in the file. Removed following functions from BinarySeekSearchBase: - _seek_and_validate - _check_line - _seek_next Introduced the following new classes: - LogFileDateSinceOffsetSeeker (the main binary search class) - DateSearchFailedAtOffset (exception type) - NoLogsFoundSince (exception type) - NoDateFoundInLogs (exception type) Signed-off-by: Mustafa Kemal Gilor <[email protected]>
- Loading branch information