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
The fate code for locking tables and namespaces is spread across three classes o.a.a.manager.tableOps.Utils, DistributedReadWriteLock, and FateLock. The data for a fate lock consist of two fields the lock type(read or write) and a fate id. Looking at the code and determining it stores these two bits of data is time consuming because the code passes around byte arrays that have that information encoded. If the code be refactored to use concrete types (FateId and DistributedReadWriteLock.LockType) deeper in the code and defer serialization to byte[] till much later in the code then this would make it much easier to understand and maintain the code and keep it correct.
The text was updated successfully, but these errors were encountered:
keith-turner
changed the title
Fate lock code use of byte[] obfuscates the simple data is being stored
Fate lock code use of byte[] obfuscates the simple data that is being stored
Jan 15, 2025
keith-turner
changed the title
Fate lock code use of byte[] obfuscates the simple data that is being stored
Fate lock code use of byte[] obfuscates the simple data being stored
Jan 15, 2025
The fate code for locking tables and namespaces is spread across three classes
o.a.a.manager.tableOps.Utils
,DistributedReadWriteLock
, andFateLock
. The data for a fate lock consist of two fields the lock type(read or write) and a fate id. Looking at the code and determining it stores these two bits of data is time consuming because the code passes around byte arrays that have that information encoded. If the code be refactored to use concrete types (FateId and DistributedReadWriteLock.LockType) deeper in the code and defer serialization tobyte[]
till much later in the code then this would make it much easier to understand and maintain the code and keep it correct.The text was updated successfully, but these errors were encountered: