-
Notifications
You must be signed in to change notification settings - Fork 994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PHOENIX-6218 Rows deleted count is incorrect for immutable tables with indexes #961
Conversation
…h indexes MutationState.join() ignores index rows in row count so totalRowCount calculated will reflect the data table always and the index table only if the bestPlan uses the index table. So ignore the other index tables when determining the number of tables updated.
A few questions for this.
|
Another question, I see the JIRA does not make a difference between sever and client side deletions. Did we test both paths? I'm assuming the new ITs hit the client path but I don't see any assertion of that. |
Last questions what is the impact to changing the output of MutationState::getUpdateCount() in the paths where that is used? Its not clear to me, I tried to follow the change but only went to the writing of the tuple in one of the iterators... |
The bug is only for client side deletes. I updated the jira title to reflect that |
@dbwong are you suggesting to change MutationState to report row count for all updated tables ? |
The tests for immutable tables is parameterized on transactions and local indexes. In the new tests that I added I have skipped the transactions but I can remove that check. @dbwong I didn't understand what you meant by handling projected tables. Can you please elaborate ? |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, Thanks
This way we don't have to fix the inflated row count by dividing the number of tables updated. Works for DELETE queries with and without LIMIT filter.
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change itself looks good, but can we reduce the amount of duplicate setup code in the tests?
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/ImmutableIndexIT.java
Show resolved
Hide resolved
phoenix-core/src/it/java/org/apache/phoenix/end2end/index/MutableIndexIT.java
Show resolved
Hide resolved
f7f744a
to
a511e38
Compare
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
@tkhurana - 4 of the 5 test failures are just timeouts, but could you please verify that UpsertSelectIT passes locally for you? That failure's coming from a failed assertion. Thanks! |
@gjacoby126 Yes, it is passing locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, thanks @tkhurana
@tkhurana - I merged into 4.x, could you please also make a version for master? |
…h indexes (#961) * PHOENIX-6218 Rows deleted count is incorrect for immutable tables with indexes Signed-off-by: Swaroopa Kadam <s.kadam@apache.org>
MutationState.join() ignores index rows in row count so totalRowCount calculated
will reflect the data table always and the index table only if the bestPlan
uses the index table. So ignore the other index tables when determining
the number of tables updated.