Mutating a directory multiple times simultaneously in the same transaction is unsafe
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
The Java implementation of DirectoryLayer does not seem to work when used with an FDBTransaction, but does when used with an FDBDatabase.
I'm seeing issues where the DirectoryLayer allocates a prefix and returns it to me. I commit the transaction successfully, but future calls to the DirectoryLayer from new transactions do not find the allocated directory.
If I use a FDBDatabase when invoking DirectoryLayer.createOrOpen(...) then all works fine.
Since FDBTransaction implements TransactionContext I would have expected it to work with DirectoryLayer. Is this a correct assumption? I know this issue is not the most helpful, but I'm not quite sure where to start on getting useful information.
Contributor guide
Research direction
Start with the Java DirectoryLayer implementation and its createOrOpen entry point, comparing calls made with FDBTransaction against FDBDatabase. Reproduce the prefix allocation, commit the transaction, and then attempt a lookup from a new transaction. Done means establishing whether TransactionContext support is expected and identifying the cause of the missing directory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100