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


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/PhoenixRegionServerEndpoint.java:
##########
@@ -101,8 +111,36 @@ public void invalidateServerMetadataCache(RpcController 
controller,
             String tenantIDStr = Bytes.toString(tenantID);
             LOGGER.info("PhoenixRegionServerEndpoint invalidating the cache 
for tenantID: {},"
                     + " tableName: {}", tenantIDStr, fullTableName);
-            ServerMetadataCache cache = getServerMetadataCache();
-            cache.invalidate(tenantID, schemaName, tableName);
+            ServerMetadataCache cache;
+            try {
+                cache = getServerMetadataCache();
+            } catch (Throwable t) {
+                String errorMsg = "Creating ServerMetadataCache FAILED, check 
exception for "
+                        + "specific details";
+                LOGGER.error(errorMsg,  t);
+                IOException ioe = ClientUtil.createIOException(errorMsg, t);
+                ProtobufUtil.setControllerException(controller, ioe);
+                return;
+            }
+            cache.invalidateLastDDLTimestampForTable(tenantID, schemaName, 
tableName);
+        }
+    }
+
+    @Override
+    public void invalidatePhoenixHACache(RpcController controller,

Review Comment:
   The goal is to fix any stuck RS that might need push to rebuild the cache



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