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

Method readValue

fdbserver/KeyValueStoreRocksDB.actor.cpp:1883–1897  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1881 }
1882
1883 Future<Optional<Value>> readValue(KeyRef key, IKeyValueStore::ReadType type, Optional<UID> debugID) override {
1884 if (!shouldThrottle(type, key)) {
1885 auto a = new Reader::ReadValueAction(key, debugID);
1886 auto res = a->result.getFuture();
1887 readThreads->post(a);
1888 return res;
1889 }
1890
1891 auto& semaphore = (type == IKeyValueStore::ReadType::FETCH) ? fetchSemaphore : readSemaphore;
1892 int maxWaiters = (type == IKeyValueStore::ReadType::FETCH) ? numFetchWaiters : numReadWaiters;
1893
1894 checkWaiters(semaphore, maxWaiters);
1895 auto a = std::make_unique<Reader::ReadValueAction>(key, debugID);
1896 return read(a.release(), &semaphore, readThreads.getPtr(), &counters.failedToAcquire);
1897 }
1898
1899 Future<Optional<Value>> readValuePrefix(KeyRef key,
1900 int maxLength,

Callers 1

Calls 5

readFunction · 0.50
getFutureMethod · 0.45
postMethod · 0.45
releaseMethod · 0.45
getPtrMethod · 0.45

Tested by

no test coverage detected