Fixing change feed error retry in pop

This commit is contained in:
Josh Slocum 2021-10-07 10:07:18 -05:00
parent 54d5e8366d
commit 31664ddb78
1 changed files with 10 additions and 1 deletions

View File

@ -7001,7 +7001,16 @@ ACTOR Future<Void> popChangeFeedMutationsActor(Reference<DatabaseContext> db, Ke
state Transaction tr(cx);
state Key rangeIDKey = rangeID.withPrefix(changeFeedPrefix);
state Span span("NAPI:PopChangeFeedMutations"_loc);
Optional<Value> val = wait(tr.get(rangeIDKey));
state Optional<Value> val;
loop {
try {
Optional<Value> _val = wait(tr.get(rangeIDKey));
val = _val;
break;
} catch (Error& e) {
wait(tr.onError(e));
}
}
if (!val.present()) {
throw unsupported_operation();
}