@Override
  public Collection<Container> updateContainers(String accountName, Collection<Container> containers)
      throws AccountServiceException {
    try {
      return super.updateContainers(accountName, containers);
    } catch (AccountServiceException ase) {
      if (needRefresh) {
        // refresh and retry (with regenerated containerIds)
        try {
          fetchAndUpdateCache();
        } catch (SQLException e) {
          throw translateSQLException(e);
        }
        accountServiceMetrics.conflictRetryCount.inc();
        return super.updateContainers(accountName, containers);
      } else {
        throw ase;
      }
    }
  }
Get an existing container from a given account.
@param accountId the name of account which container belongs to.
@param containerId the id of container to get.
@return the requested {@link Container} object or null if not present.
@throws AccountServiceException if exception occurs when getting container.
ambry-account/src/main/java/com/github/ambry/account/CachedAccountService.java