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

Method writeKV_impl

fdbclient/FileBackupAgent.actor.cpp:549–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547
548 // Start a new block if needed, then write the key and value
549 ACTOR static Future<Void> writeKV_impl(RangeFileWriter* self, Key k, Value v) {
550 int toWrite = sizeof(int32_t) + k.size() + sizeof(int32_t) + v.size();
551 wait(self->newBlockIfNeeded(toWrite));
552 wait(self->file->appendStringRefWithLen(k));
553 wait(self->file->appendStringRefWithLen(v));
554 self->lastKey = k;
555 self->lastValue = v;
556 return Void();
557 }
558
559 Future<Void> writeKV(Key k, Value v) { return writeKV_impl(this, k, v); }
560

Callers

nothing calls this directly

Calls 4

newBlockIfNeededMethod · 0.95
VoidClass · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected