ritegarg commented on code in PR #2075:
URL: https://github.com/apache/phoenix/pull/2075#discussion_r1981771879


##########
phoenix-core/src/it/java/org/apache/phoenix/end2end/PhoenixRegionServerEndpointIT.java:
##########
@@ -158,6 +160,18 @@ public void testValidateLastDDLTimestampWithTenantID() 
throws SQLException {
         }
     }
 
+    @Test
+    public void testInvalidatePhoenixHACache() throws Exception {
+        HRegionServer regionServer = 
utility.getMiniHBaseCluster().getRegionServer(0);
+        PhoenixRegionServerEndpoint coprocessor = 
getPhoenixRegionServerEndpoint(regionServer);
+        assertNotNull(coprocessor);
+        ServerRpcController controller = new ServerRpcController();
+        RegionServerEndpointProtos.InvalidatePhoenixHACacheRequest request
+                = 
RegionServerEndpointProtos.InvalidatePhoenixHACacheRequest.newBuilder().build();
+        coprocessor.invalidatePhoenixHACache(controller, request, null);
+        assertFalse(controller.failed());

Review Comment:
   This is a backup in case the events are not flowing from ZK. If events are 
flowing from ZK, cache should always be up to date. Simulating ZK connectivity 
failure won't be trivial. Open to suggestions.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to