Rushabh Shah created PHOENIX-7113:
-------------------------------------

             Summary: Create a feature flag for invoking 
MDEI#invalidateServerMetadataCache
                 Key: PHOENIX-7113
                 URL: https://issues.apache.org/jira/browse/PHOENIX-7113
             Project: Phoenix
          Issue Type: Sub-task
            Reporter: Rushabh Shah


During schema changes, we invoke 
PhoenixRegionServerEndpoint#invalidateServerMetadataCache on all regionservers 
to invalidate cache for the table which is undergoing schema changes.
To handle incompatibilitues during upgrade, we check if 
PhoenixRegionServerEndpoint coproc is loaded or not. If it is not loaded on 
SYSCAT regionserver, then we don't invalidate the cache but if it is loaded on 
SYSCAT regionserver then we call this coproc method on all regionservers. But 
it is possible that during upgrade if we upgrade the system regionservers first 
then PhoenixRegionServerEndpoint is loaded on SYSCAT RS but not loaded on other 
regionservers. This can cause failures during upgrade. 
To avoid this, lets create a new conf property and once all the reginservers 
are upgraded then set that to true.

{code}
        String value = conf.get(REGIONSERVER_COPROCESSOR_CONF_KEY);
        if (value == null
                || 
!value.contains(PhoenixRegionServerEndpoint.class.getName())) {
            // PhoenixRegionServerEndpoint is not loaded. We don't have to 
invalidate the cache.
            LOGGER.info("Skip invalidating server metadata cache since 
PhoenixRegionServerEndpoint"
                            + " is not loaded");
            return;
        }
{code}




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

Reply via email to