mirror of
https://github.com/morluto/rea.git
synced 2026-11-03 05:16:16 +00:00
fix(sqlite): preserve snapshot admission failure semantics
Refuse oversized database and WAL inputs before acquisition with exact observed bytes and export guidance. Keep initial path failures separate from file-set changes and retain cleanup and partial observations on late growth. Refs #4208, #4188, #4141, #4127 Co-authored-by: hima <1ep23ic023@eastpoint.ac.in> Co-authored-by: Royce <roycelam@umich.edu>
This commit is contained in:
1 parent
85eac7b92b
commit
bc51d0ea5d
7 files changed
+538
-24
No files matched your search
@@ -79,7 +79,7 @@ export const sqliteDatabaseFailure = (
|
||||
return new AnalysisInputError(operation, { cause }, [
|
||||
{
|
||||
path: ["path"],
|
||||
reason: cause.reason === "limit" ? "out_of_range" : "invalid_format",
|
||||
reason: "invalid_format",
|
||||
message: cause.message,
|
||||
},
|
||||
]);
|
||||
@@ -110,7 +110,12 @@ export const sqliteDatabaseFailure = (
|
||||
"The selected SQLite database is held open by another process without read sharing. Close that application or inspect a copy, then retry.",
|
||||
},
|
||||
);
|
||||
if (cause.code === "ENOENT" || cause.code === "ENOTDIR")
|
||||
if (
|
||||
cause.code === "ENOENT" ||
|
||||
cause.code === "ENOTDIR" ||
|
||||
cause.code === "ELOOP" ||
|
||||
cause.code === "ENAMETOOLONG"
|
||||
)
|
||||
return new AnalysisInputError(operation, { cause }, [
|
||||
{
|
||||
path: ["path"],
|
||||
|
||||
Reference in new issue
Block a user