[phoenix] branch PHOENIX-6883-feature updated (8664b60397 -> d47071ad02)

2023-10-02 Thread shahrs87
This is an automated email from the ASF dual-hosted git repository.

shahrs87 pushed a change to branch PHOENIX-6883-feature
in repository https://gitbox.apache.org/repos/asf/phoenix.git


from 8664b60397 PHOENIX-6968 Create 
PhoenixRegionServerEndpoint#invalidateCache method to invalidate cache. (#1691)
 add 163d11afbd PHOENIX-7057 Potential bug in 
MetadataEndpointImpl#updateIndexState.
 new d47071ad02 Merge branch 'master' into PHOENIX-6883-feature

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[phoenix] 01/01: Merge branch 'master' into PHOENIX-6883-feature

2023-10-02 Thread shahrs87
This is an automated email from the ASF dual-hosted git repository.

shahrs87 pushed a commit to branch PHOENIX-6883-feature
in repository https://gitbox.apache.org/repos/asf/phoenix.git

commit d47071ad02d1250a558e644352288d7d910343cd
Merge: 8664b60397 163d11afbd
Author: Rushabh Shah 
AuthorDate: Mon Oct 2 15:40:58 2023 -0700

Merge branch 'master' into PHOENIX-6883-feature

 .../main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)




[phoenix] branch PHOENIX-6883-feature updated: PHOENIX-6968 Create PhoenixRegionServerEndpoint#invalidateCache method to invalidate cache. (#1691)

2023-10-02 Thread shahrs87
This is an automated email from the ASF dual-hosted git repository.

shahrs87 pushed a commit to branch PHOENIX-6883-feature
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/PHOENIX-6883-feature by this 
push:
 new 8664b60397 PHOENIX-6968 Create 
PhoenixRegionServerEndpoint#invalidateCache method to invalidate cache. (#1691)
8664b60397 is described below

commit 8664b60397acbc9b30503f7e96fc07491e5f0946
Author: Rushabh Shah 
AuthorDate: Mon Oct 2 15:15:09 2023 -0700

PHOENIX-6968 Create PhoenixRegionServerEndpoint#invalidateCache method to 
invalidate cache. (#1691)
---
 .../FailingPhoenixRegionServerEndpoint.java|  91 
 .../phoenix/end2end/InvalidateMetadataCacheIT.java | 164 +++
 .../end2end/PhoenixRegionServerEndpointIT.java |   3 -
 .../phoenix/end2end/SplitSystemCatalogIT.java  |   1 -
 .../apache/phoenix/cache/ServerMetadataCache.java  |  27 +++
 .../phoenix/coprocessor/MetaDataEndpointImpl.java  | 205 --
 .../coprocessor/PhoenixRegionServerEndpoint.java   |  30 ++-
 .../java/org/apache/phoenix/util/ServerUtil.java   |  15 ++
 .../protobuf/RegionServerEndpointService.proto |  19 +-
 .../phoenix/cache/ServerMetadataCacheTest.java | 231 +
 .../java/org/apache/phoenix/query/BaseTest.java|  18 ++
 11 files changed, 785 insertions(+), 19 deletions(-)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/FailingPhoenixRegionServerEndpoint.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/FailingPhoenixRegionServerEndpoint.java
new file mode 100644
index 00..7e40cfe76f
--- /dev/null
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/FailingPhoenixRegionServerEndpoint.java
@@ -0,0 +1,91 @@
+/*
+ * 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.end2end;
+
+import com.google.protobuf.RpcCallback;
+import com.google.protobuf.RpcController;
+import org.apache.phoenix.coprocessor.PhoenixRegionServerEndpoint;
+import org.apache.phoenix.coprocessor.generated.RegionServerEndpointProtos;
+import org.apache.phoenix.protobuf.ProtobufUtil;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.IOException;
+
+import static 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.PHOENIX_METADATA_CACHE_INVALIDATION_TIMEOUT_MS;
+import static 
org.apache.phoenix.coprocessor.MetaDataEndpointImpl.PHOENIX_METADATA_CACHE_INVALIDATION_TIMEOUT_MS_DEFAULT;
+
+public class FailingPhoenixRegionServerEndpoint extends 
PhoenixRegionServerEndpoint {
+private static final Logger LOGGER = 
LoggerFactory.getLogger(FailingPhoenixRegionServerEndpoint.class);
+
+private boolean throwException;
+private boolean shouldSleep;
+private boolean failFirstAndThenSucceed;
+private int attempt = 0;
+
+@Override
+public void invalidateServerMetadataCache(RpcController controller,
+RegionServerEndpointProtos.InvalidateServerMetadataCacheRequest 
request,
+
RpcCallback 
done) {
+long metadataCacheInvalidationTimeoutMs = conf.getLong(
+PHOENIX_METADATA_CACHE_INVALIDATION_TIMEOUT_MS,
+PHOENIX_METADATA_CACHE_INVALIDATION_TIMEOUT_MS_DEFAULT);
+
+if (throwException == true) {
+IOException ioe = new IOException("On purpose");
+ProtobufUtil.setControllerException(controller, ioe);
+return;
+} else if (shouldSleep) {
+try {
+// Sleeping for 2 seconds more than 
metadataCacheInvalidationTimeoutMs.
+Thread.sleep(metadataCacheInvalidationTimeoutMs + 2000);
+} catch (InterruptedException e) {
+LOGGER.warn("Exception while sleeping in 
FailingPhoenixRegionServerEndpoint", e);
+}
+} else if (failFirstAndThenSucceed) {
+if (attempt == 0) {
+IOException ioe = new IOException("On purpose");
+ProtobufUtil.setControllerException(controller, ioe);
+attempt++;
+}
+}
+else {
+LOGGER.info("Invalidating server metadata cache");
+}
+}
+
+public 

Apache-Phoenix | master | HBase 2.4 | Build #581 FAILURE

2023-10-02 Thread Apache Jenkins Server

master branch  HBase 2.4  build #581 status FAILURE
Build #581 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/581/


Apache-Phoenix | master | HBase 2.5 | Build #581 FAILURE

2023-10-02 Thread Apache Jenkins Server

master branch  HBase 2.5  build #581 status FAILURE
Build #581 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/master/581/


Apache-Phoenix | 5.1 | HBase 2.5 | Build #269 SUCCESS

2023-10-02 Thread Apache Jenkins Server

5.1 branch  HBase 2.5  build #269 status SUCCESS
Build #269 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/269/


Apache-Phoenix | 5.1 | HBase 2.3 | Build #269 SUCCESS

2023-10-02 Thread Apache Jenkins Server

5.1 branch  HBase 2.3  build #269 status SUCCESS
Build #269 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/269/


Apache-Phoenix | 5.1 | HBase 2.4 | Build #269 SUCCESS

2023-10-02 Thread Apache Jenkins Server

5.1 branch  HBase 2.4  build #269 status SUCCESS
Build #269 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/269/


Apache-Phoenix | 5.1 | HBase 2.2 | Build #269 FAILURE

2023-10-02 Thread Apache Jenkins Server

5.1 branch  HBase 2.2  build #269 status FAILURE
Build #269 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/269/


Apache-Phoenix | 5.1 | HBase 2.1 | Build #269 FAILURE

2023-10-02 Thread Apache Jenkins Server

5.1 branch  HBase 2.1  build #269 status FAILURE
Build #269 https://ci-hadoop.apache.org/job/Phoenix/job/Phoenix-mulitbranch/job/5.1/269/


[phoenix] branch 5.1 updated: PHOENIX-7048 SaltedTableMergeBucketsIT very flakey on 5.1 with Hbase 2.1 and 2.2

2023-10-02 Thread stoty
This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
 new 3b974023cb PHOENIX-7048 SaltedTableMergeBucketsIT very flakey on 5.1 
with Hbase 2.1 and 2.2
3b974023cb is described below

commit 3b974023cbce09c71f825155cbf4997d46607a02
Author: Istvan Toth 
AuthorDate: Mon Oct 2 10:32:11 2023 +0200

PHOENIX-7048 SaltedTableMergeBucketsIT very flakey on 5.1 with Hbase 2.1 
and 2.2
---
 .../org/apache/phoenix/end2end/salted/SaltedTableMergeBucketsIT.java  | 4 
 1 file changed, 4 insertions(+)

diff --git 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableMergeBucketsIT.java
 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableMergeBucketsIT.java
index 01fc614836..87da6c63f7 100644
--- 
a/phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableMergeBucketsIT.java
+++ 
b/phoenix-core/src/it/java/org/apache/phoenix/end2end/salted/SaltedTableMergeBucketsIT.java
@@ -22,6 +22,7 @@ import static 
org.apache.phoenix.util.TestUtil.assertResultSet;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
+import static org.junit.Assume.assumeTrue;
 
 import java.sql.Connection;
 import java.sql.DriverManager;
@@ -41,6 +42,7 @@ import java.util.stream.IntStream;
 import org.apache.hadoop.hbase.TableName;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.RegionInfo;
+import org.apache.hadoop.hbase.util.VersionInfo;
 import org.apache.phoenix.end2end.ParallelStatsEnabledIT;
 import org.apache.phoenix.end2end.ParallelStatsEnabledTest;
 import org.apache.phoenix.query.QueryServices;
@@ -280,6 +282,8 @@ public class SaltedTableMergeBucketsIT extends 
ParallelStatsEnabledIT {
 }
 
 public void mergeRegions(String testTableName) throws Exception {
+// Merge seems to have problems on Hbase 2.1 and 2.2
+assumeTrue(VersionInfo.compareVersion(VersionInfo.getVersion(), "2.3") 
>= 0);
 Admin admin =
 driver.getConnectionQueryServices(getUrl(), 
TestUtil.TEST_PROPERTIES).getAdmin();
 List regions = 
admin.getRegions(TableName.valueOf(testTableName));



[phoenix] branch 5.1 updated: PHOENIX-7057 Potential bug in MetadataEndpointImpl#updateIndexState.

2023-10-02 Thread stoty
This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch 5.1
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/5.1 by this push:
 new 77c9c56fc5 PHOENIX-7057 Potential bug in 
MetadataEndpointImpl#updateIndexState.
77c9c56fc5 is described below

commit 77c9c56fc53eb26d8bbc461fba71809b218c1da0
Author: Istvan Toth 
AuthorDate: Mon Oct 2 13:53:36 2023 +0200

PHOENIX-7057 Potential bug in MetadataEndpointImpl#updateIndexState.
---
 .../main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index b4bba44947..871249fadb 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -3694,7 +3694,7 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES);
 byte[] count;
 try (RegionScanner countScanner = 
region.getScanner(new Scan(get))) {
 List countCells = new ArrayList<>();
-scanner.next(countCells);
+countScanner.next(countCells);
 count = Result.create(countCells)
 .getValue(TABLE_FAMILY_BYTES,
 
PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES);



[phoenix] branch master updated: PHOENIX-7057 Potential bug in MetadataEndpointImpl#updateIndexState.

2023-10-02 Thread stoty
This is an automated email from the ASF dual-hosted git repository.

stoty pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/phoenix.git


The following commit(s) were added to refs/heads/master by this push:
 new 163d11afbd PHOENIX-7057 Potential bug in 
MetadataEndpointImpl#updateIndexState.
163d11afbd is described below

commit 163d11afbd343183ccb8a7f86b5395566a0f154b
Author: Istvan Toth 
AuthorDate: Mon Oct 2 13:53:36 2023 +0200

PHOENIX-7057 Potential bug in MetadataEndpointImpl#updateIndexState.
---
 .../main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
index 7db23f4678..422eac328e 100644
--- 
a/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
+++ 
b/phoenix-core/src/main/java/org/apache/phoenix/coprocessor/MetaDataEndpointImpl.java
@@ -4066,7 +4066,7 @@ TABLE_FAMILY_BYTES, TABLE_SEQ_NUM_BYTES);
 byte[] count;
 try (RegionScanner countScanner = 
region.getScanner(new Scan(get))) {
 List countCells = new ArrayList<>();
-scanner.next(countCells);
+countScanner.next(countCells);
 count = Result.create(countCells)
 .getValue(TABLE_FAMILY_BYTES,
 
PhoenixDatabaseMetaData.PENDING_DISABLE_COUNT_BYTES);