Viraj Jasani created PHOENIX-7514: ------------------------------------- Summary: CDC grammar for enabling or disabling Stream Key: PHOENIX-7514 URL: https://issues.apache.org/jira/browse/PHOENIX-7514 Project: Phoenix Issue Type: Sub-task Reporter: Viraj Jasani
So far, we use "CREATE CDC" and "DROP CDC" grammar to create and drop multiple CDC objects for the given table. However, we should allow creating only single CDC object for the given table because the CDC object internally creates CDC Index for the given table. As this index is built on PARTITION_ID() and PHOENIX_ROW_TIMESTAMP(), having multiple similar index can be overkill for the CDC purpose. Once the CDC Stream is created, CDC consumer can define start and end timestamp that they are interested in. In order to hide the details of CDC object from the user, we should define grammar such that it allows building CDC Index only once per table. Once the CDC object and index is created, we should not allow creating more CDC objects for the given table. Proposed new grammar to enable the CDC stream on the given table: {code:java} ENABLE CDC ON <table-name>{code} Proposed new grammar to disable the CDC stream on the given table: {code:java} DISABLE CDC ON <table-name> {code} As we no longer need to provide CDC object name with the grammar, client inherently creates CDC object name as _phoenix-cdc-stream-<tablename>-<timestamp>_ -- This message was sent by Atlassian Jira (v8.20.10#820010)