Stop a stalled snapshot database read when restore or deep verify is interrupted (closes #356)
check / check (push) Canceled after 0s
check / check (push) Canceled after 0s
Restore and deep verify read the snapshot database straight from storage rather than through FetchBlob, so the earlier fix for stalled blob reads did not cover it. A database read stalled on a slow USB stick or network share kept the operation from returning after Ctrl-C; the process then exited at the shutdown timeout and left the decrypted database in the temp directory. Both reads now wrap the storage reader in the close-on-cancel reader FetchBlob uses, so a cancel ends the stalled read and the temp directory is removed. The interrupt test now stalls either a blob or the snapshot database, for both commands. Limitation: a read stuck in the kernel that closing cannot interrupt, such as one on an unresponsive hard NFS mount, still cannot be stopped. Model: opus-5-5
This commit was merged in pull request #363.
This commit is contained in:
@@ -702,6 +702,8 @@ func (v *Vaultik) downloadSnapshotDB(
|
||||
return nil, "", fmt.Errorf("downloading %s: %w", dbKey, err)
|
||||
}
|
||||
|
||||
reader = newCloseOnCancelReader(v.ctx, reader)
|
||||
|
||||
defer func() { _ = reader.Close() }()
|
||||
|
||||
// Decrypt and decompress straight from the storage stream, then stream
|
||||
|
||||
Reference in New Issue
Block a user