code: public Long fetchNewVersion(String versionKey, Long curVersion, Properties versionProps) {
          try {
              Long newVersion = getCurrentVersion(versionKey, versionProps);
  
              // If version obtained is null, the store is untouched. Continue
              if(newVersion != null) {
                  logger.debug("MetadataVersion check => Obtained " + versionKey + " version : "
                               + newVersion);
  
                  /*
                   * Check if the new version is greater than the current one. We
                   * should not re-bootstrap on a stale version.
                   */
                  if(curVersion == null || newVersion > curVersion) {
                      return newVersion;
                  }
              } else {
                  logger.debug("Metadata unchanged after creation ...");
              }
          }
  
          // Swallow all exceptions here (we don't want to fail the client).
          catch(Exception e) {
              logger.debug("Could not retrieve Metadata Version. Exception : " + e);
          }
  
          return null;
      }
docs: /*
  This method checks for any update in the version for 'versionKey'. If
  there is any change, it returns the new version. Otherwise it will return
  a null.