Uh oh!
There was an error while loading. Please reload this page.
PHOENIX-6082 : Avoid checkAndPut when altering properties for a table or view with column-encoding enabled - #982
PHOENIX-6082 : Avoid checkAndPut when altering properties for a table or view with column-encoding enabled#982virajjasani wants to merge 1 commit into
Conversation
stoty
commented
Nov 22, 2020
💔 -1 overall
This message was automatically generated. |
stoty
commented
Nov 22, 2020
💔 -1 overall
This message was automatically generated. |
virajjasani
commented
Nov 23, 2020
Test failure with |
virajjasani
commented
Nov 23, 2020
@ChinmaySKulkarni@yanxinyi could you please take a look? |
ChinmaySKulkarni
left a comment
There was a problem hiding this comment.
@virajjasani thanks for the patch! I have a few nit-type comments on your tests, otherwise lgtm. Can you please confirm this patch locally by scanning SYSTEM.MUTEX via HBase shell?
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| ResultSet resultSet = conn.createStatement().executeQuery( | ||
| "SELECT * FROM " + PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME); | ||
| if (resultSet.next()) { | ||
| isSysMutexEmpty.getAndSet(false); |
There was a problem hiding this comment.
this can be a simple set() since you're not using the returned value right?
Uh oh!
There was an error while loading. Please reload this page.
| while (!Thread.interrupted() && !conn.isClosed()) { | ||
| try { | ||
| ResultSet resultSet = conn.createStatement().executeQuery( | ||
| "SELECT * FROM " + PhoenixDatabaseMetaData.SYSTEM_MUTEX_NAME); |
There was a problem hiding this comment.
In case we do end up going this route then, just to be safe, can we query the exact expected row in SYSTEM.MUTEX instead of this query? If this gets run in parallel with any of the upgrade tests (where we acquire an upgrade mutex), your test will fail.
… or view with column-encoding enabled
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
stoty
commented
Nov 26, 2020
💔 -1 overall
This message was automatically generated. |
Sure, confirmed by scanning SYSTEM.MUTEX on local cluster with and without this patch. Initially, updated SYSTEM.MUTEX with KEEP_DELETED_CELLS => 'TRUE' because while executing ALTER TABLE query, Mutex cell is going to be deleted soon (finally block), hence it appears only momentarily. With patch, no records were found while scanning SYSTEM.MUTEX: Without patch, executed ALTER TABLE query twice and found two deleted rows (first scan result after first execution of ALTER query, and second scan result after second execution of ALTER query) : ALTER TABLE query used for testing: |
There was a problem hiding this comment.
+1 can you please put up a pr against 4.x too?
-- edit: nevermind, just saw #983
Anyone else want to take a look @yanxinyi@gjacoby126@jpisaac ?
virajjasani
commented
Dec 7, 2020
Thanks for the reviews @ChinmaySKulkarni@yanxinyi |




No description provided.