From: Robin Geuze Date: Fri, 25 Sep 2020 13:59:17 +0000 (+0200) Subject: Catch the none existent shard case and just skip that X-Git-Tag: auth-4.4.0-alpha1^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6addc1d6b2f7a10e64c4f9252a1bbbc2921ebfa;p=thirdparty%2Fpdns.git Catch the none existent shard case and just skip that --- diff --git a/modules/lmdbbackend/lmdbbackend.cc b/modules/lmdbbackend/lmdbbackend.cc index adccc89d35..71ba3b7b88 100644 --- a/modules/lmdbbackend/lmdbbackend.cc +++ b/modules/lmdbbackend/lmdbbackend.cc @@ -547,6 +547,10 @@ bool LMDBBackend::upgradeToSchemav3() for(auto i = 0; i < d_shards; i++) { string filename = getArg("filename")+"-"+std::to_string(i); if (rename(filename.c_str(), (filename+"-old").c_str()) < 0) { + if (errno == ENOENT) { + // apparently this shard doesn't exist yet, moving on + continue; + } unixDie("Rename failed during LMDB upgrade"); }