MCPcopy Create free account
hub / github.com/FoundationDB/fdb-document-layer / beforeWrite

Method beforeWrite

src/ExtStructs.actor.cpp:64–70  ·  view source on GitHub ↗

* beforeWrite's future is set when the current write may *begin* while satisfying all ordering and pipelining * constraints The return value has no impact on when *subsequent* writes may be consumed from the network and/or * started; that is controlled by afterWrite(). But this code stashes some information which the next call to * afterWrite() uses. */

Source from the content-addressed store, hash-verified

62 * afterWrite() uses.
63 */
64Future<Void> ExtConnection::beforeWrite(int desiredPermits) {
65 if (options.pipelineCompatMode)
66 return ready(lastWrite);
67 currentWriteLocked =
68 lock->take(TaskDefaultYield, std::min(desiredPermits, DOCLAYER_KNOBS->CONNECTION_MAX_PIPELINE_DEPTH / 2));
69 return currentWriteLocked;
70}
71
72/**
73 * afterWrite()'s return future is set when the next write may be consumed from the network (and beforeWrite()

Callers 1

runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected