You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
core: Reduce fileId byte[] usage; improve and encourage use of Opaque
We currently use byte[] in many places where we actually convert them
back into Base64 (and sometimes Base16) encoded strings, especially
around locking. This is suboptimal. We also pass byte[] directly, which
allows direct manipulation, which is also not good.
Deprecate direct use of Inode.getFileId. Return an "Opaque" for locking
purposes as well (but allow them to be separate from the Opaque fileId
key to allow coarser locking).
Provide default implementations of the Opaque-variants in LockManager.
Changes to AbstractLockManager etc. follow in a separate commit.
Change the Base16-encoded file names in FsCache to the same
Base64-encoded locking key.
Make Opaque immutable-ish (deprecate constructor and getOpaque() method
that allows direct manipulation of the underlying byte[] but keep them
in for now for backwards compatibility), and add a cached
byte[]-to-Base64 string which is constructed only upon demand.
Related: #149
Signed-off-by: Christian Kohlschütter <[email protected]>
0 commit comments