]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Catch the none existent shard case and just skip that 9531/head
authorRobin Geuze <robing@transip.nl>
Fri, 25 Sep 2020 13:59:17 +0000 (15:59 +0200)
committerRobin Geuze <robing@transip.nl>
Fri, 25 Sep 2020 13:59:17 +0000 (15:59 +0200)
modules/lmdbbackend/lmdbbackend.cc

index adccc89d351d73a1b9389a4587f273d30c9207f9..71ba3b7b88ae530b86105ca5cd1889083e5f75ad 100644 (file)
@@ -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");
     }