Log transaction result for transactions containing atomic ops
- Dominant language
- C++
- Stars
- 16.7k
- Forks
- 1.6k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 126
Description
For most transactions, we can validate if they were performed as part of the read. However, suppose that one’s transaction is just {atomicInc(X)}. There’s no other read that’s a part of this to give the initial value, so if FDB returns commit_unknown_result for this, it’s likely impossible to know if the increment occurred or not.
To resolve this, we can require each client to generate a unique ID, submit each transaction with an atomic op with an additional blind write to (“\xff\x02/commit_result/”, ). If a transaction receives a commit_unknown_result in commit, it can then try to get a new read version and read the above key to resolve if the commit occurred. If it does, then return success, and the commit version is pulled from the saved versionstamp. This data can be given a relatively short TTL, to narrowly bound how much storage space will given to storing transaction outcomes.
Contributor guide
Assessment
This issue has not been assessed yet.