Introduce completed_scan_id to worktree
We need to know the most recent scan id we have actually completed. This is to handle the case where a guest disconnects when we're in the middle of streaming worktree entries to them. When they reconnect, they need to report a scan_id from before we started streaming the entries, because we have no record of when the stream was interrupted. Next failure: SEED=5051 ITERATIONS=1 OPERATIONS=200 cargo test --release --package=collab random -- --nocapture
This commit is contained in:
parent
90fb9b53ad
commit
1dd085fc92
3 changed files with 27 additions and 7 deletions
|
@ -382,7 +382,7 @@ impl Room {
|
|||
let worktree = worktree.read(cx);
|
||||
proto::RejoinWorktree {
|
||||
id: worktree.id().to_proto(),
|
||||
scan_id: worktree.scan_id() as u64,
|
||||
scan_id: worktree.completed_scan_id() as u64,
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue