This repository has been archived by the owner on Nov 14, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DbKvs sweep refactors to address last PR comments (#2497)
* DbKvs sweep refactors to address last PR comments As dxiao pointed out, CandidatePagingState does too many things. The solution is to make CellTsPairLoader return an iterator and move all paging logic inside that iterator, and remove CellTsPairLoaderFactory. Then we replace CandidatePagingState with CandidateGroupingIterator, which now doesn't have any paging logic and only takes care of grouping (cell, ts) pairs by cell. Also remove CandidatePageJoiningIterator because it's not used anymore. We could have done this earlier but I forgot. Plan for the future: - Since we gave up on the in-database filtering idea, we can replace KVS.getCandidateCellsForSweeping() with a simpler call like getCellTsPairs() which would do what CellTsPairLoader does now. - Implement the new call for the remaining KVS's. We need at least the InMemoryKVS. We should decide the destiny of JdbcKVS and CqlKVS. - Remove all remaining usages of getRangeOfTimestamps(). I think that's basically deleteRange() on Cassandra. - Remove KVS.getRangeOfTimestamps()! [no release notes] * Renames * Create OracleCellTsPageLoader.PageIterator.Token class * Create PostgresCellTsPageLaoder.PageIterator.Token * Fix Precondition having-next-ness is a state, not an argument * One Token To Rull Them All Well... two, actually. This one is a CellTsPairToken. We already had a Token class in DbKvs :-/ * Make CellTsPairToken final; replace modification with factory methods * Have computeNextStartPosition return a token * Remove the TODO I don't think we can do it nicely * empty commit * Nits * Move duplicated precondition to CellTsPairToken and add error message * Renames * Make CellTsPairToken immutable * Sort timestamps array, just in case
- Loading branch information
Showing
13 changed files
with
519 additions
and
757 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 0 additions & 65 deletions
65
.../java/com/palantir/atlasdb/keyvalue/dbkvs/impl/postgres/CandidatePageJoiningIterator.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.