checkNotNull(sagaId, "Saga id key must be set.");
synchronized (sync) {
SagaState removedItem = storedStates.remove(sagaId);
if (removedItem != null) {
for (String instanceKey : removedItem.instanceKeys()) {
instanceKeyMap.remove(SagaMultiKey.create(removedItem.getType(), instanceKey), removedItem);
}
}
}
}