mirror of
https://github.com/apple/foundationdb.git
synced 2025-06-02 19:25:52 +08:00
runRYWTransaction:Add comment to remind func should be idempodent
This commit is contained in:
parent
c4ac68ef1e
commit
9cff90fb5f
@ -37,6 +37,7 @@ runRYWTransaction(Database cx, Function func) {
|
||||
state Reference<ReadYourWritesTransaction> tr(new ReadYourWritesTransaction(cx));
|
||||
loop{
|
||||
try {
|
||||
// func should be idempodent; otherwise, retry will get undefined result
|
||||
state decltype( fake<Function>()( Reference<ReadYourWritesTransaction>() ).getValue()) result = wait(func(tr));
|
||||
wait(tr->commit());
|
||||
return result;
|
||||
|
Loading…
x
Reference in New Issue
Block a user