Review of 1.0.3: names a snapshot cannot hold, restore-directory errors under salvage, browse speed

- Leave out and report a file or folder whose name a snapshot cannot hold
- A staging write failure stops a full restore under --salvage
- Browse reuses its repository; empty folders read along with the entries
- Keep leases alive while empty folders are created; exact-prefix empty folder is the target
- Clean up tables that were partly created or before the transaction started
- Bin: no empty message after a read error; longer pages
This commit is contained in:
2026-11-06 19:44:52 +01:00
parent c7a651f269
commit 1736005648
9 changed files with 68 additions and 19 deletions
+7 -2
View File
@@ -160,8 +160,8 @@ final class DbDumper {
try {
foreach ($missing as $table) {
if (isset($manifest['tables'][$table]['schema'])) {
$report['created'][] = $table; // first: creating it can stop halfway (its indexes)
$this->db->createSchemaManager()->createTable(self::tableFromStructure($table, $manifest['tables'][$table]['schema'], $this->tableOptions()));
$report['created'][] = $table;
} else {
$report['missing'][] = $table;
}
@@ -172,7 +172,12 @@ final class DbDumper {
}
$total = 0;
$foreignKeys = [];
$this->db->beginTransaction();
try {
$this->db->beginTransaction();
} catch (\Throwable $e) {
$this->dropCreatedTables($report);
throw $e;
}
try {
$foreignKeys = $this->suspendForeignKeys(); // first: on SQLite it also takes the write lock
foreach ($manifest['tables'] as $table => $info) {