Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Implemented
-
None
Description
While working on Prefix ACL, it's found that there are very little tests on Prefix ACL OM HA request and response flow. We need to add more tests for prefix ACL.
There are also identified possible bugs that might have be a problem in the future. They are:
- It's found that OmPrefixInfo and PersistedPrefixInfo do not store and load the updateID and the objectID from DB correctly
- We need to add the object ID and updateID in the prefix codec process.
- UpdateID stored in the OmPrefixInfo on the in-memory prefix tree are not updated
- In OMPrefixAclRequest, the setUpdateId is called after the we apply the ACL operation to the prefix tree (through PrefixManager), this causes OmPrefixInfo update ID to be different than the one in the OM DB
- We need set the update ID to OmPrefixInfo before we apply the ACL operation to the prefix tree, so that it will be reflected as well.
- PrefixManager only updates the OmPrefixInfo in the prefix tree for ACL operations that changes underlying ACLs
- If there is no changes in the underlying ACL (e.g. adding existing ACL), the prefix tree will not be updated
- However, under the OM HA write flow, every request will update the updateID
- Therefore, we need to update the prefix tree regardless whether the ACL operation results in ACL change
- Add prefix object validation in OMPrefixAclRequest#validateAndUpdateCache
- This will fix the issue in
HDDS-8157which was caused byHDDS-6964(HDDS-6964. [Snapshot] Split out shared "Path based access" code from OM. #3653) - The exception assertion will be added back to TestKeyManagerImpl#testInvalidPrefixAcl
- This will fix the issue in