I've just noticed that my v1 patch here has introduced a bug. If I 1) apply an ACL to a file, 2) remove that ACL, 3) save a new checkpoint, and 4) restart NN, I find that I can no longer add a new ACL to that file. Somehow, the file has been left in a state where the ACL bit is off, but it has an AclFeature. Then, when I try to add an ACL again, it trips the IllegalStateException for trying to add multiple instances of AclFeature in INodeWithAdditionalFields#addAclFeature.
I'm going to track down this bug. I suspect this patch will remain mostly the same, but I wanted to give potential code reviewers a heads-up that there will be a v2 patch coming.