Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fate lock code use of byte[] obfuscates the simple data being stored #5264

Open
keith-turner opened this issue Jan 15, 2025 · 0 comments
Open
Milestone

Comments

@keith-turner
Copy link
Contributor

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.

@keith-turner keith-turner added this to the 4.0.0 milestone Jan 15, 2025
@keith-turner 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 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant