mirror of
https://github.com/narrrl/proton-drive-linux.git
synced 2026-11-04 16:56:59 +01:00
fix(core,fuse): keep replaced and vanished files from failing saves, reads and syncs
Fixes from the account acceptance runs: - B104: a reader open across a rename-over keeps working; the replaced node is unlinked like any other open file instead of forgotten. - B105: a drain worker holding a revision withdrawn by an unlink no longer uploads it as a recovered-… conflict copy (Db::op_exists). - B106: an open victim's queued ops are withdrawn at trash time, so a repeated editor save no longer fails with AlreadyExists; the staged blob goes with the last close. - B107: a remote read gives up after 120 s with EIO instead of hanging its caller; the timer is built inside the runtime. - B108: a mirror upload whose local file was deleted after the scan is skipped rather than counted as an error. The acceptance script reports the failing line for non-assert errors, ignores queue ops that predate the run, purges with delete-forever first, and diagnoses a malformed SQLite database against a local replay.
This commit is contained in:
1 parent
7b67db5ced
commit
a2992b3b9d
11 files changed
+579
-34
No files matched your search
@@ -5209,3 +5209,28 @@ fn retry_all_touches_only_ops_that_have_failed() {
|
||||
assert_eq!(due(debounced), 7_000);
|
||||
assert_eq!(due(parked), ops::PARK_UNTIL);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn a_queued_op_stops_existing_once_the_node_is_deleted() {
|
||||
let db = Db::open_in_memory().unwrap();
|
||||
let (id, _) = db
|
||||
.enqueue_op(&PendingOp {
|
||||
id: 0,
|
||||
kind: OP_REVISION.to_string(),
|
||||
uid: uid("journal").to_string(),
|
||||
parent_uid: None,
|
||||
name: None,
|
||||
blob_path: Some("/staging/journal".to_string()),
|
||||
meta_json: Some("{}".to_string()),
|
||||
created_at: 1,
|
||||
attempts: 0,
|
||||
last_error: None,
|
||||
next_attempt_at: 0,
|
||||
})
|
||||
.unwrap();
|
||||
assert!(db.op_exists(id).unwrap());
|
||||
|
||||
let blobs = db.delete_ops_for_uid(&uid("journal").to_string()).unwrap();
|
||||
assert_eq!(blobs, vec!["/staging/journal"]);
|
||||
assert!(!db.op_exists(id).unwrap());
|
||||
}
|
||||
Reference in new issue
Block a user