George Jahad created HDDS-7168:
----------------------------------

             Summary: Prevent writes to keys that start with ".snapshot"
                 Key: HDDS-7168
                 URL: https://issues.apache.org/jira/browse/HDDS-7168
             Project: Apache Ozone
          Issue Type: Sub-task
            Reporter: George Jahad


The snapshot design defines a key prefix for use with snapshots: 
".snapshot/snapshotName".  Any read of a key with that prefix should be be read 
from the corresponding snapshot.

But nothing currently prevents key writes from inadvertenly using that prefix, 
and if they do, they will not be readable.

To prevent user confusion, we should disallow them from writing any keys with 
the ".snapshot" prefix.

One possible approach would be to add a preExecute method to the OMKeyRequest 
class, (which is a parent of  the key write commands.)  That method would check 
the key and throw an invalid key error if needed.  (OMKeyRequest would likely 
need to add an abstract method that each of the specific write classes would 
need to implement.)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to