Files
oak-gpui/crates
Antonio Scandurra d36a4888db Ensure worktrees have been sent before responding with definitions
Changing the frequency at which we update worktrees highlighted a
problem in the randomized tests that was causing clients to receive
a definition to a worktree *before* observing the registration of
the worktree itself. This was most likely caused by #1224 because
the scenario that pull request enabled was the following:

- Guest requests a definition pointing to a non-existant worktree
- Server forwards the request to the host
- Host sends an `UpdateProject` message
- Host sends a response to the definition request
- Server observes the `UpdateProject` message and tries to acquire
  the store
- Given that we're waiting, the server goes ahead to process the
  response for the definition request, responding *before*
  `UpdateProject` is forwarded
- Server finally forwards `UpdateProject` to the guest

This commit ensures that, after forwarding a project request and getting a
response, we acquire a lock to the store again to ensure the project still
exists. This has the effect of ordering the forwarded request *after* any
message that was received prior to the response and for which we are still
waiting to acquire a lock to the store.
2022-07-01 11:45:30 +02:00
..
2022-05-31 11:16:32 +02:00
2022-06-28 13:45:34 -07:00
2022-06-27 16:21:22 -07:00
🎨
2022-05-23 09:48:00 +02:00
2022-05-09 12:48:07 -06:00
2022-06-27 16:21:22 -07:00
2022-05-26 17:02:05 -07:00