agreed  i think that the algorithm should be record metadata dirty state before doing anything remove the key from instance metadata if metadata was not dirty before  it should not be dirty after this  since the changes have been synced  if it was  then it was not because of this and it should remain dirty  thoughts 