lmdb: Open LMDB file after restoring cache so DBs added from cache have the storage initialized
This commit is contained in:
parent
5a66bdc8c2
commit
300f74fb10
|
@ -506,6 +506,10 @@ std::size_t ServiceSetup::restoreState()
|
||||||
cerr << Phrases::WarningMessage << "An IO error occurred when restoring cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush;
|
cerr << Phrases::WarningMessage << "An IO error occurred when restoring cache file \"" << cacheFilePath << "\"." << Phrases::EndFlush;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// open LMDB storage
|
||||||
|
cout << Phrases::InfoMessage << "Opening LMDB file: " << dbPath << " (max DBs: " << maxDbs << ')' << Phrases::EndFlush;
|
||||||
|
config.initStorage(dbPath.data(), maxDbs);
|
||||||
|
|
||||||
// restore build actions from JSON file
|
// restore build actions from JSON file
|
||||||
if (!hasBuildActions) {
|
if (!hasBuildActions) {
|
||||||
try {
|
try {
|
||||||
|
@ -621,8 +625,6 @@ std::size_t ServiceSetup::saveState()
|
||||||
|
|
||||||
void ServiceSetup::initStorage()
|
void ServiceSetup::initStorage()
|
||||||
{
|
{
|
||||||
cout << Phrases::InfoMessage << "Opening LMDB file: " << dbPath << " (max DBs: " << maxDbs << ')' << Phrases::EndFlush;
|
|
||||||
config.initStorage(dbPath.data(), maxDbs);
|
|
||||||
restoreState();
|
restoreState();
|
||||||
config.markAllDatabasesToBeDiscarded();
|
config.markAllDatabasesToBeDiscarded();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue