How about creating `0.tmp` first, and then check if it pass the validation (key length)? If yes, then start doing the rotation (i.e. rename current staged key to the next primary, and then rename `0.tmp` to `0`). If not, then delete `0.tmp` and leave some error messages.
Hi Lance,
How about creating `0.tmp` first, and then check if it pass the validation (key length)? If yes, then start doing the rotation (i.e. rename current staged key to the next primary, and then rename `0.tmp` to `0`). If not, then delete `0.tmp` and leave some error messages.