MCPcopy Create free account
hub / github.com/apple/foundationdb / sendCommitReply

Function sendCommitReply

fdbserver/RemoteIKeyValueStore.actor.cpp:55–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53};
54
55ACTOR void sendCommitReply(IKVSCommitRequest commitReq, IKeyValueStore* kvStore, Future<Void> onClosed) {
56 try {
57 choose {
58 when(wait(onClosed)) { commitReq.reply.sendError(remote_kvs_cancelled()); }
59 when(wait(kvStore->commit(commitReq.sequential))) {
60 StorageBytes storageBytes = kvStore->getStorageBytes();
61 commitReq.reply.send(IKVSCommitReply(storageBytes));
62 }
63 }
64 } catch (Error& e) {
65 TraceEvent(SevDebug, "RemoteKVSCommitReplyError").errorUnsuppressed(e);
66 commitReq.reply.sendError(e.code() == error_code_actor_cancelled ? remote_kvs_cancelled() : e);
67 }
68}
69
70ACTOR template <class T>
71Future<Void> cancellableForwardPromise(ReplyPromise<T> output, Future<T> input) {

Callers 1

Future<Void> runIKVSFunction · 0.85

Calls 8

IKVSCommitReplyClass · 0.85
TraceEventClass · 0.85
whenFunction · 0.70
commitMethod · 0.65
sendErrorMethod · 0.45
sendMethod · 0.45
getStorageBytesMethod · 0.45
codeMethod · 0.45

Tested by

no test coverage detected