[ https://issues.apache.org/jira/browse/PHOENIX-7584?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17944825#comment-17944825 ]
Viraj Jasani commented on PHOENIX-7584: --------------------------------------- [~tkhurana] can we use conditional TTL with 5.3 release? or shall we wait for one more patch/minor release after 5.3 in order to make this schema change? cc [~palashc] > Conditional TTL on SYSTEM.CDC_STREAM > ------------------------------------ > > Key: PHOENIX-7584 > URL: https://issues.apache.org/jira/browse/PHOENIX-7584 > Project: Phoenix > Issue Type: Improvement > Reporter: Viraj Jasani > Priority: Major > Fix For: 5.3.0 > > > SYSTEM.CDC_STREAM consists of partition (region) records and maintains > lineage using split or merge of the regions. > After configurable duration, the records from SYSTEM.CDC_STREAM table should > be removed as the client is expected to read the change stream for specific > time duration. For instance, if the client keeps maxLookback of the base > table as 24 hr, the TTL for the CDC Index is expected to be 24 hr. Therefore, > once a region closes due to split or merge, updating SYSTEM.CDC_STREAM record > with non-null PARTITION_END_TIME value, we should purge the partition record > from SYSTEM.CDC_STREAM after 24 hr. > > For this purpose, we should define Conditional TTL on SYSTEM.CDC_STREAM as: > {code:java} > TTL = PARTITION_END_TIME IS NOT NULL AND CURRENT_TIME() >= > (PHOENIX_ROW_TIMESTAMP() + (24 * 60 * 60 * 1000)){code} -- This message was sent by Atlassian Jira (v8.20.10#820010)