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

Function asyncWrite

fdbserver/VFSAsync.cpp:176–187  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

174#endif
175
176static int asyncWrite(sqlite3_file* pFile, const void* zBuf, int iAmt, sqlite_int64 iOfst) {
177 VFSAsyncFile* p = (VFSAsyncFile*)pFile;
178 try {
179 waitFor(p->file->write(zBuf, iAmt, iOfst));
180 return SQLITE_OK;
181 } catch (Error& e) {
182 if (e.isInjectedFault()) {
183 VFSAsyncFile::setInjectedError(SQLITE_IOERR_WRITE);
184 }
185 return SQLITE_IOERR_WRITE;
186 }
187}
188
189static int asyncTruncate(sqlite3_file* pFile, sqlite_int64 size) {
190 VFSAsyncFile* p = (VFSAsyncFile*)pFile;

Callers

nothing calls this directly

Calls 3

waitForFunction · 0.85
isInjectedFaultMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected