Uploaded image for project: 'Phoenix'
  1. Phoenix
  2. PHOENIX-6883 Phoenix metadata caching redesign
  3. PHOENIX-7113

Create a feature flag for invoking MDEI#invalidateServerMetadataCache

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • None
    • None

    Description

      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.

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

      Attachments

        Issue Links

          Activity

            People

              shahrs87 Rushabh Shah
              shahrs87 Rushabh Shah
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: