Performance bug fix: Every page cache hit was calling forwardError() unnecessarily.

This commit is contained in:
Steve Atherton 2021-01-05 21:34:16 -08:00
parent 5f06c20d08
commit 4c28341351
1 changed files with 1 additions and 2 deletions

View File

@ -1649,11 +1649,10 @@ public:
if (!cacheEntry.initialized()) {
debug_printf("DWALPager(%s) issuing actual read of %s\n", filename.c_str(), toString(pageID).c_str());
cacheEntry.readFuture = readPhysicalPage(this, (PhysicalPageID)pageID);
cacheEntry.readFuture = forwardError(readPhysicalPage(this, (PhysicalPageID)pageID), errorPromise);
cacheEntry.writeFuture = Void();
}
cacheEntry.readFuture = forwardError(cacheEntry.readFuture, errorPromise);
return cacheEntry.readFuture;
}