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

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

shahrs87 commented on code in PR #1610:
URL: https://github.com/apache/phoenix/pull/1610#discussion_r1251324351


##########
phoenix-core/src/main/java/org/apache/phoenix/coprocessor/VerifyLastDDLTimestamp.java:
##########
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.phoenix.coprocessor;
+
+import org.apache.hadoop.hbase.client.Mutation;
+import org.apache.hadoop.hbase.client.Scan;
+import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
+import org.apache.hadoop.hbase.regionserver.MiniBatchOperationInProgress;
+import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.phoenix.cache.ServerMetadataCache;
+import org.apache.phoenix.coprocessor.generated.DDLTimestampMaintainersProtos;
+import org.apache.phoenix.util.LastDDLTimestampMaintainerUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+import java.util.List;
+
+import static 
org.apache.phoenix.coprocessor.BaseScannerRegionObserver.LAST_DDL_TIMESTAMP_MAINTAINERS;
+import static 
org.apache.phoenix.coprocessor.BaseScannerRegionObserver.LAST_DDL_TIMESTAMP_MAINTAINERS_VERIFIED;
+import static org.apache.phoenix.schema.types.PDataType.TRUE_BYTES;
+
+/**
+ * Client provides last DDL timestamp of tables/views/indexes included in 
read/write operation
+ * through scan or mutation {@link 
BaseScannerRegionObserver#LAST_DDL_TIMESTAMP_MAINTAINERS}
+ * attribute.
+ * This verifies that client has the latest version of LAST_DDL_TIMESTAMP 
version.
+ * If client's provided LAST_DDL_TIMESTAMP is less than what is present in 
SYSTEM.CATALOG

Review Comment:
   Both are fetched from SYSCAT table. One is cached on the client and other is 
cached on the region server. I don't think we will have to worry about clock 
skew issue here.





> Add MetadaCache on each region server.
> --------------------------------------
>
>                 Key: PHOENIX-6943
>                 URL: https://issues.apache.org/jira/browse/PHOENIX-6943
>             Project: Phoenix
>          Issue Type: Sub-task
>          Components: core
>            Reporter: Rushabh Shah
>            Assignee: Rushabh Shah
>            Priority: Major
>             Fix For: 5.2.0
>
>
> Design doc 
> [here|https://docs.google.com/document/d/1ZIu7TyzI7aDhgMOWa7mbUmwbFNbiPVwpWjb6QisT4ng/edit#heading=h.fa8lnra4hvey].



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to