-
Notifications
You must be signed in to change notification settings - Fork 993
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-7008 Implementation for CREATE CDC #1681
PHOENIX-7008 Implementation for CREATE CDC #1681
Conversation
… underlying hbase table
bin/sqlline.py
Outdated
@@ -114,6 +116,7 @@ def kill_child(): | |||
disable_jna = "" | |||
|
|||
java_cmd = java + ' $PHOENIX_OPTS ' + \ | |||
(args.debug and "-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=127.0.0.1:8071" or "") + \ |
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.
this is local change right?
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.
I am hoping to include this as it is quite useful. Do you see any problem?
bin/sqlline.py
Outdated
" -u jdbc:phoenix:" + phoenix_utils.shell_quote([zookeeper]) + \ | ||
" -n none -p none --color=" + colorSetting + " --fastConnect=" + tryDecode(args.fastconnect) + \ | ||
" --verbose=" + tryDecode(args.verbose) + " --incremental=false --isolation=TRANSACTION_READ_COMMITTED " + sqlfile | ||
(not args.noconnect and " -u jdbc:phoenix:" + phoenix_utils.shell_quote([zookeeper]) or "") + \ |
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.
same here, all changes in this file can be removed
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.
I would like to include the changes in the sqlline, unless there is a problem with the approach. I can also raise it as a separate PR if that is preferred.
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.
yeah i think separate Jira would be better to track it and others can also review, i am not actually sure whether we can make the change or not because at least we don't use this script as is in production env
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.
I now moved the change into PHOENIX-7055 and created a separate PR #1695. Please take a look.
public class CDCMiscIT extends ParallelStatsDisabledIT { | ||
private void assertCDCState(Connection conn, String cdcName, String expInclude, | ||
int idxType) throws SQLException { | ||
try (ResultSet rs = conn.createStatement().executeQuery("SELECT cdc_include FROM " + |
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.
Once all the SELECT queries to SYSTEM.CATALOG are replaced with PTable based comparison, we are good to go
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.
I have added the check for the change scope on PTable
as it corresponds to the protobuf change but left the existing SYSCAT checks as is, as these are existing fields and don't necessarily have to be validated through PTable
. WDYT?
Looks like PTableType change from previous commit caused the conflict |
looks good otherwise |
FIxed the conflict and moved out the sqlline.py change. |
Some test failures reported with error:
https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-PreCommit-GitHub-PR/job/PR-1681/5/testReport/ otherwise, we are good to go. |
@@ -4107,6 +4109,9 @@ protected PhoenixConnection upgradeSystemCatalogIfRequired(PhoenixConnection met | |||
metaConnection = addColumnsIfNotExists(metaConnection, PhoenixDatabaseMetaData.SYSTEM_CATALOG, | |||
MIN_SYSTEM_TABLE_TIMESTAMP_5_2_0, |
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.
Here MIN_SYSTEM_TABLE_TIMESTAMP_5_2_0 should be increased by 1 and then each addColumns above will decrease it by 1. This can lead to BackwardCompatibilityIT tests to fail, which we are seeing,
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.
Done, thank you!
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.
The tests are still failing for the same reason, but this time on the PHYSICAL_TABLE_NAME
column (the very first one). Could you please check to see what I might have done wrong?
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.
Value of MIN_SYSTEM_TABLE_TIMESTAMP needs to be increased by 1 as well here :-
phoenix/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataProtocol.java
Line 102 in 6125f02
public static final long MIN_SYSTEM_TABLE_TIMESTAMP_5_2_0 = MIN_TABLE_TIMESTAMP + 37; |
581e613
into
apache:PHOENIX-7001-feature
Address the changes in the CREATE CDC spec in PHOENIX-7001 Also includes some review feedback changes across the changes in PRs apache#1681, apache#1703 and apache#1766
Address the changes in the CREATE CDC spec in PHOENIX-7001 Also includes some review feedback changes across the changes in PRs apache#1681, apache#1703 and apache#1766
Address the changes in the CREATE CDC spec in PHOENIX-7001 Also includes some review feedback changes across the changes in PRs apache#1681, apache#1703 and apache#1766
This commit includes a squash of all the below changes from the PRs apache#1662, apache#1694, down by removing non-functional changes for the ease of review. On top of it, the changes have been reworked for the changed state of master, especially the new submodules. * 4c9827a Hari.. PHOENIX-7008 Shallow grammar support for CREATE CDC (apache#1662) * e5220e0 TheN.. PHOENIX-7054 Shallow grammar support for DROP CDC and ALTER CDC (apache#1694) * 581e613 Hari.. PHOENIX-7008 Implementation for CREATE CDC (apache#1681) * e2ef886 Hari.. PHOENIX-7008 Tweaks, fixes and additional test coverage for CREATE CDC (apache#1703) * 5d3fd40 TheN.. PHOENIX-7074 DROP CDC Implementation (apache#1713) * 7420443 Hari.. PHOENIX-7014: Query compiler/optimizer changes along with some PHOENIX-7015 changes (apache#1766) * da6ddad Kadi.. Add an extra delete mutation for CDC * 93d586e Kadi.. Add an extra delete mutation during rebuild for CDC index * f07898f Hari.. PHOENIX-7008: Addressing Jira spec and review feedback changes (apache#1802) * 87a2ea1 Hari.. PHOENIX-7008: Fix for parser gap and fix for failing test (apache#1812) * e395780 TheN.. PHOENIX-7015 Implementing CDCGlobalIndexRegionScanner (apache#1813) Co-authored-by: Saurabh Rai <saurabh.rai@salesforce.com>
…ture This commit includes a squash of all the below changes from the PRs apache#1662, apache#1694, down by removing non-functional changes for the ease of review. On top of it, the changes have been reworked for the changed state of master, especially the new submodules. * 4c9827a Hari.. PHOENIX-7008 Shallow grammar support for CREATE CDC (apache#1662) * e5220e0 TheN.. PHOENIX-7054 Shallow grammar support for DROP CDC and ALTER CDC (apache#1694) * 581e613 Hari.. PHOENIX-7008 Implementation for CREATE CDC (apache#1681) * e2ef886 Hari.. PHOENIX-7008 Tweaks, fixes and additional test coverage for CREATE CDC (apache#1703) * 5d3fd40 TheN.. PHOENIX-7074 DROP CDC Implementation (apache#1713) * 7420443 Hari.. PHOENIX-7014: Query compiler/optimizer changes along with some PHOENIX-7015 changes (apache#1766) * da6ddad Kadi.. Add an extra delete mutation for CDC * 93d586e Kadi.. Add an extra delete mutation during rebuild for CDC index * f07898f Hari.. PHOENIX-7008: Addressing Jira spec and review feedback changes (apache#1802) * 87a2ea1 Hari.. PHOENIX-7008: Fix for parser gap and fix for failing test (apache#1812) * e395780 TheN.. PHOENIX-7015 Implementing CDCGlobalIndexRegionScanner (apache#1813) Co-authored-by: Saurabh Rai <saurabh.rai@salesforce.com>
This PR builds on top of the shallow grammar support added for CREATE CDC grammar as part of #1662. This change makes the required syscat changes along with the creation of the underly index. There are quite a few TODO items that need to be discussed, but this PR can still be merged as we can address them in future PRs.
Jira: PHOENIX-7008