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
getRowsColumnRange always has cells grouped by row #4687
Merged
mswintermeyer
merged 10 commits into
develop
from
michaelw/fixGetRowsColumnRangeRowGrouping
Apr 1, 2020
Merged
getRowsColumnRange always has cells grouped by row #4687
mswintermeyer
merged 10 commits into
develop
from
michaelw/fixGetRowsColumnRangeRowGrouping
Apr 1, 2020
Conversation
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
Ensure that throughout the iterator manipulation that happens internally to getRowsColumnRange that we maintain the invariant that all cells for a given row will be grouped together at the end.
Generate changelog in
|
After taking another look, I think I'm more decided on fixing this by ensuring the rows stay returned in their original order, rather than by trying sorting the rows as they're passed in. Some callers pass in a List of rows and assume that the resulting cells will come back in the same row-order. |
j-baker
reviewed
Mar 31, 2020
...sdb-impl-shared/src/main/java/com/palantir/atlasdb/transaction/impl/SnapshotTransaction.java
Outdated
Show resolved
Hide resolved
j-baker
reviewed
Apr 1, 2020
...ests-shared/src/test/java/com/palantir/atlasdb/transaction/impl/SnapshotTransactionTest.java
Outdated
Show resolved
Hide resolved
j-baker
approved these changes
Apr 1, 2020
delete-merged-branch
bot
deleted the
michaelw/fixGetRowsColumnRangeRowGrouping
branch
April 1, 2020 17:55
Released 0.202.2 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ensure that throughout the iterator manipulation that happens
internally to getRowsColumnRange that we maintain the invariant
that all cells for a given row will be grouped together at the end.
Goals (and why):
After #4668 (though maybe before as well if the BatchSizeIncreasingIterator didn't kick in?), getRowsColumnRange could return an iterator where the cells for a given row are not always grouped together, which could break assumptions made by clients.
Implementation Description (bullets):
Two potential implementation options, and I'm curious what people think is cleanest: we can sort the rows passed in, so that they're in the same order that we internally sort Cells in, or we should purely rely on the ordering provided by the KVS.
Testing (What was existing testing like? What have you done to improve it?):
Changing the existing tests to shuffle the order of rows passed in, which was enough to break things somewhat. But that combined with having rows not have a cell count that's a multiple of the number of the batch size is where the test demonstrates what could could actually go bad.
Concerns (what feedback would you like?):
What option to fix this is cleanest?
Where should we start reviewing?:
Priority (whenever / two weeks / yesterday):