private void resumeDecommission(String partitionName) throws Exception {
      logger.info("Resuming decommission on replica {}", partitionName);
      // 1. perform Standby-To-Inactive transition in StorageManager. This is to disable compaction at the very beginning
      //    to avoid position of last PUT in store changes.
      onPartitionBecomeInactiveFromStandby(partitionName);
      if (replicationManagerListener != null && replicaSyncUpManager != null) {
        // 2. perform Standby-To-Inactive transition in ReplicationManager. This is to initiate deactivation on given
        //    partition and will be blocked until peer replicas have caught up with last PUT in corresponding store.
        replicationManagerListener.onPartitionBecomeInactiveFromStandby(partitionName);
        replicaSyncUpManager.waitDeactivationCompleted(partitionName);
        // 3. perform Inactive-To-Offline transition in ReplicationManager. This is to initiate disconnection on given
        //    partition and will be blocked until peer replicas have caught up with last record(i.e DELETE etc) in store.
        replicationManagerListener.onPartitionBecomeOfflineFromInactive(partitionName);
        replicaSyncUpManager.waitDisconnectionCompleted(partitionName);
      }
      // 4. perform Inactive-To-Offline transition in StorageManager. However, we don't do anything currently during
      // this transition
      onPartitionBecomeOfflineFromInactive(partitionName);
      logger.info("Decommission on replica {} is almost done, dropping it from current node", partitionName);
    }
This method is called by Offline-To-Dropped transition. Any errors/exceptions will be thrown and converted to
{@link StateTransitionException}. The error/exception is also recorded in certain metric for alerting purpose.
NOTE: there are 4 steps to resume decommission(see comments in method) and the steps should be performed in order.
This method basically repeats the Standby-To-Inactive and Inactive-To-Offline transitions. That's why we see
replication manager listener is called twice for different transitions.
ambry-store/src/main/java/com/github/ambry/store/StorageManager.java