Source:
public boolean updateAccounts(Collection<Account> accounts) { checkOpen(); Objects.requireNonNull(accounts, "accounts cannot be null"); if (hasDuplicateAccountIdOrName(accounts)) { logger.debug("Duplicate account id or name exist in the accounts to update"); accountServiceMetrics.updateAccountErrorCount.inc(); return false; } long startTimeMs = System.currentTimeMillis(); logger.trace("Start updating to HelixPropertyStore with accounts={}", accounts); boolean hasSucceeded = false; if (hasConflictWithCache(accounts)) { logger.debug("Accounts={} conflict with the accounts in local cache. Cancel the update operation.", accounts); accountServiceMetrics.updateAccountErrorCount.inc(); } else { ZkUpdater zkUpdater = new ZkUpdater(accounts); hasSucceeded = helixStore.update(FULL_ACCOUNT_METADATA_PATH, zkUpdater, AccessOption.PERSISTENT); zkUpdater.persistBackup(hasSucceeded); } long timeForUpdate = System.currentTimeMillis() - startTimeMs; if (hasSucceeded) { logger.trace("Completed updating accounts, took time={} ms", timeForUpdate); accountServiceMetrics.updateAccountTimeInMs.update(timeForUpdate); if (notifier == null) { logger.warn("Notifier is not provided. Cannot notify other entities interested in account data change."); } else if (notifier.publish(ACCOUNT_METADATA_CHANGE_TOPIC, FULL_ACCOUNT_METADATA_CHANGE_MESSAGE)) { logger.trace("Successfully published message for account metadata change"); } else { logger.error("Failed to send notification for account metadata change"); accountServiceMetrics.notifyAccountDataChangeErrorCount.inc(); } } else { logger.error("Failed updating accounts={}, took ms", accounts, timeForUpdate); accountServiceMetrics.updateAccountErrorCount.inc(); } return hasSucceeded; }

Target:
public boolean updateAccounts(Collection<Account> accounts) { checkOpen(); Objects.requireNonNull(accounts, "accounts cannot be null"); if (hasDuplicateAccountIdOrName(accounts)) { logger.debug("Duplicate account id or name exist in the accounts to update"); accountServiceMetrics.updateAccountErrorCount.inc(); return false; } long startTimeMs = System.currentTimeMillis(); logger.trace("Start updating to HelixPropertyStore with accounts={}", accounts); boolean hasSucceeded = false; if (hasConflictWithCache(accounts)) { logger.debug("Accounts={} conflict with the accounts in local cache. Cancel the update operation.", accounts); accountServiceMetrics.updateAccountErrorCount.inc(); } else { ZkUpdater zkUpdater = new ZkUpdater(accounts); hasSucceeded = helixStore.update(FULL_ACCOUNT_METADATA_PATH, zkUpdater, AccessOption.PERSISTENT); zkUpdater.maybePersistNewState(hasSucceeded); } long timeForUpdate = System.currentTimeMillis() - startTimeMs; if (hasSucceeded) { logger.trace("Completed updating accounts, took time={} ms", timeForUpdate); accountServiceMetrics.updateAccountTimeInMs.update(timeForUpdate); if (notifier == null) { logger.warn("Notifier is not provided. Cannot notify other entities interested in account data change."); } else if (notifier.publish(ACCOUNT_METADATA_CHANGE_TOPIC, FULL_ACCOUNT_METADATA_CHANGE_MESSAGE)) { logger.trace("Successfully published message for account metadata change"); } else { logger.error("Failed to send notification for account metadata change"); accountServiceMetrics.notifyAccountDataChangeErrorCount.inc(); } } else { logger.error("Failed updating accounts={}, took ms", accounts, timeForUpdate); accountServiceMetrics.updateAccountErrorCount.inc(); } return hasSucceeded; }