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


##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/PhoenixRegionServerEndpoint.java:
##########
@@ -101,8 +112,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;

Review Comment:
   Now with separated cache, I'll remove it



##########
phoenix-core-server/src/main/java/org/apache/phoenix/coprocessor/PhoenixRegionServerEndpoint.java:
##########
@@ -61,7 +62,17 @@ public void validateLastDDLTimestamp(RpcController 
controller,
             RegionServerEndpointProtos.ValidateLastDDLTimestampRequest request,
             
RpcCallback<RegionServerEndpointProtos.ValidateLastDDLTimestampResponse> done) {
         metricsSource.incrementValidateTimestampRequestCount();
-        ServerMetadataCache cache = getServerMetadataCache();
+        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;
+        }

Review Comment:
   Now with separated cache, I'll remove it



##########
phoenix-core-client/src/main/java/org/apache/phoenix/cache/ServerMetadataCache.java:
##########
@@ -24,5 +24,5 @@
 public interface ServerMetadataCache {
     long getLastDDLTimestampForTable(byte[] tenantID, byte[] schemaName, 
byte[] tableName)
             throws SQLException;
-    void invalidate(byte[] tenantID, byte[] schemaName, byte[] tableName);
+    void invalidateLastDDLTimestampForTable(byte[] tenantID, byte[] 
schemaName, byte[] tableName);

Review Comment:
   Now with separated cache, I'll remove it



-- 
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: issues-unsubscr...@phoenix.apache.org

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

Reply via email to