You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@phoenix.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2020/11/16 23:23:00 UTC

[jira] [Commented] (PHOENIX-5601) PHOENIX-5601 Add a new coprocessor for PHOENIX_TTL - PhoenixTTLRegionObserver

    [ https://issues.apache.org/jira/browse/PHOENIX-5601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17233148#comment-17233148 ] 

ASF GitHub Bot commented on PHOENIX-5601:
-----------------------------------------

yanxinyi commented on a change in pull request #955:
URL: https://github.com/apache/phoenix/pull/955#discussion_r524741262



##########
File path: phoenix-core/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java
##########
@@ -1107,6 +1108,16 @@ private void addCoprocessors(byte[] tableName, HTableDescriptor descriptor,
                     }
                 }
             }
+
+            // The priority for this co-processor should be set higher than the GlobalIndexChecker so that the read repair scans
+            // are intercepted by the TTLAwareRegionObserver and only the rows that are not ttl-expired are returned.
+            if (!SchemaUtil.isSystemTable(tableName)) {
+                if (!descriptor.hasCoprocessor(PhoenixTTLRegionObserver.class.getName())) {
+                    descriptor.addCoprocessor(
+                            PhoenixTTLRegionObserver.class.getName(), null, priority-2, null);

Review comment:
       why priority - 2 here?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


> PHOENIX-5601 Add a new coprocessor for PHOENIX_TTL - PhoenixTTLRegionObserver
> -----------------------------------------------------------------------------
>
>                 Key: PHOENIX-5601
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-5601
>             Project: Phoenix
>          Issue Type: Sub-task
>    Affects Versions: 5.1.0, 4.16.0
>            Reporter: Jacob Isaac
>            Assignee: Jacob Isaac
>            Priority: Major
>         Attachments: PHOENIX-5601.4.x.002.patch
>
>
>  * Add a New coprocessor - ViewTTLAware Coprocessor that will intercept scan/get requests to inject a new ViewTTLAware scanner.
> The scanner will -
>   * Use the row timestamp of the empty column to determine whether row TTL has expired  and mask the rows from underlying query results.
>   * Use the row timestamp to delete expired rows when DELETE_VIEW_TTL_EXPIRED flag is present.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)