Commit Graph
233 Commits
Author SHA1 Message Date
Max Brunsfeld cd823ede4d Add a bit to each entry indicating if it's outside of the worktree root 2023-06-22 10:34:28 -07:00
Mikayla Maki 28ba27c9c5 Merge branch 'main' into stream-git-statuses 2023-06-07 14:12:58 -07:00
Mikayla Maki 4ac5f7b14e Add statuses to test integration 2023-06-05 12:06:23 -07:00
Mikayla MakiandJulia 22e4086658 WIP: Move statuses to be on their associated file entries in worktree
co-authored-by: Julia <julia@zed.dev>
2023-05-31 11:03:11 -07:00
Max Brunsfeld 8f95435548 Replicate project-specific settings when collaborating 2023-05-30 18:08:03 -07:00
Mikayla Maki 99fcf23798 fmt 2023-05-18 14:31:08 -07:00
Mikayla Maki 95a7d69bce Fixed an imprecise join in rejoin room 2023-05-18 14:29:18 -07:00
Mikayla Maki 307dd2b83e Update proto names to reflect new status info 2023-05-15 16:20:01 -07:00
Mikayla Maki dfb6a2f7fc fmt 2023-05-11 12:02:25 -07:00
Mikayla Maki 5accf7cf4e Update is_deleted when sending new repositories 2023-05-11 10:21:25 -07:00
Mikayla Maki 191ac86f09 Remove the CORRECT, overly agressive deletion codepath 2023-05-11 09:24:36 -07:00
Mikayla Maki adfbbf21b2 fmt 2023-05-10 20:09:37 -07:00
Mikayla Maki f5c633e80c Fixed bug in status deletion marking 2023-05-10 19:54:02 -07:00
Mikayla Maki fca3bb3b93 Add randomized test for git statuses 2023-05-10 19:21:27 -07:00
Mikayla Maki 65d4c4f6ed Add integration test for git status 2023-05-10 17:37:36 -07:00
Mikayla Maki e20eaca595 Got basic replication working :) 2023-05-10 17:37:36 -07:00
Mikayla Maki 2b80dfa81d Update protos 2023-05-10 17:37:36 -07:00
Mikayla Maki 94a0de4c9f Fix compile errors 2023-05-10 17:37:36 -07:00
Mikayla MakiandMax d8dac07408 Removed scan ID from repository interfaces
co-authored-by: Max <max@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla Maki 53569ece03 WIP: Change RepositoryEntry representation to be keyed off of the work directory
Removes branches button scaffolding
2023-05-08 14:33:59 -07:00
b6d6f5c650 WIP: re-arranging the RepositoryEntry representation
Added branches to the randomized test to check the git branch
Added the remaining database integrations in collab

Co-authored-by: Max <max@zed.dev>
Co-authored-by: Petros <petros@zed.dev>
2023-05-08 14:33:59 -07:00
Mikayla MakiandMax 8301ee43d6 WIP: Add repository entries to collab and synchronize when rejoining the room
co-authored-by: Max <max@zed.dev>
2023-05-08 14:33:59 -07:00
Antonio Scandurra 172441ab72 Cancel pending calls when participant fails to reconnect
Previously, we would only cancel pending calls when the room became
empty.
2023-04-11 16:33:08 +02:00
Max BrunsfeldandAntonio Scandurra 26dae3c04e Lookup access tokens by id when authenticating a connection
This avoids the cost of hashing an access token multiple times,
to compare it to all known access tokens for a given user.

Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-17 11:13:50 -07:00
Max Brunsfeld b9bc66aa9b Log the delay when retrying a transaction 2023-03-16 13:07:38 -07:00
Max BrunsfeldandAntonio Scandurra 35280f7d80 Introduce a delay before retrying a transaction after a serialization failure
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2023-03-16 13:07:38 -07:00
Antonio Scandurra cba41ef7c5 Create user record automatically when someone logs in on the website
Now that we are moving out of the private alpha, we should let everyone
in when they try to log into zed.dev.
2023-03-14 12:25:04 +01:00
JuliaandNathan Sobo d173b1d412 Update db followers table when user leaves a project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2023-03-07 18:56:03 -05:00
Julia 465d8cc2ff Differentiate between follow state on a per-project basis 2023-02-24 00:07:17 -05:00
Antonio Scandurra bbeb33bc7e Fix error when deleting rooms containing projects on refresh
A foreign key violation was causing the server to never delete stale
rooms during `Database::refresh_room` due to having one or more project
records referencing the room.
2023-02-23 15:54:35 +01:00
Antonio Scandurra 74e0bed38f Fix compilation errors after restructuring room_transaction 2023-02-23 15:17:22 +01:00
Antonio Scandurra 1c636500de Merge pull request #2200 from zed-industries/fix-slow-project-join
Hold room lock through the entirety of a `room_transaction`
2023-02-23 09:11:58 +01:00
JuliaandMax Brunsfeld 0324ca3b08 Be more specific about clearing (leader, follower) row
Previously anyone unfollowing someone would clear all other rows for
other followers leading to an incorrect state, fix and test

Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-22 15:29:20 -05:00
Max Brunsfeld 0dc92bec5c Retrieve room id from the project when following/unfollowing
Previously, we were accidentally using the project id as the room id.
2023-02-22 11:34:55 -05:00
Julia 4513c40993 Following face piles finally take their first breath 2023-02-22 11:21:23 -05:00
JuliaandMax Brunsfeld 4ffc8cd9fd Fix deadlock in db get_room
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2023-02-22 11:21:23 -05:00
Julia 2592ec7265 Initial tracking of unfollows on collab server 2023-02-22 11:21:23 -05:00
JuliaandAntonio Scandurra d6462c611c Begin tracking follow states on collab server
Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-02-22 11:21:23 -05:00
Antonio Scandurra 8dd249a7cd Hold room lock through the entirety of a room_transaction
Previously, when the host repeatedly sent `UpdateWorktree` messages,
new guests attempting to join a project would observe a severe slowdown
caused by a database serialization error (e.g., the coherence of the data
would get violated midway through `Database::join_project` due to worktree
entries being mutated as the user joined). Writing entries is pretty fast,
whereas reading all of them for a project can take more than 100ms.
Transactions that failed due to a serialization error are retried, but the guest
would keep retrying until the host finished writing because the guest's read
was slow.

This commit changes the semantics of `room_transaction` to acquire a room
lock before even starting the transaction and holding it all the way after
commit (storing it, as before, in the `RoomGuard`). This ensures that a fast
writer (the host) can't starve a slow reader (the guest), allowing the latter
to make progress by temporarily pausing writes by the former.
2023-02-22 16:04:29 +01:00
Antonio Scandurra ac7618da17 Merge pull request #2103 from zed-industries/connection-staleness
Fix connection staleness issues
2023-01-27 11:01:24 +01:00
Max Brunsfeld 1b45911857 Omit hidden worktrees when showing projects in collaboration UI 2023-01-26 14:47:37 -08:00
Petros AmoiridisandAntonio Scandurra 73af155dd6 Refactor Database::remove_contact
Refactor it to avoid sending irrelevant messages to update the UI.

Co-Authored-By: Antonio Scandurra <me@as-cii.com>
2023-01-26 19:01:51 +02:00
Antonio Scandurra 74aeec360d Cancel pending call when participant leaves room after a reconnection
Previously, if a user temporarily disconnected while there was a pending
call, we would fail to cancel such pending call when the caller left the
room. This was due to the caller reconnecting and having a different connection
id than the one originally used to initiate the call.
2023-01-26 16:44:55 +01:00
Joseph T. Lyons c3b102f5a8 Add users to mailing list when using an invite link 2023-01-17 16:46:01 -05:00
Nathan Sobo 1006ada458 Update scan_id on worktree entries when there is a conflict
Forgetting to do this meant we were unable to sync changes with reconnecting
guests in some cases.
2023-01-04 13:59:16 -07:00
Nathan Sobo 90fb9b53ad WIP 2023-01-03 13:30:14 -07:00
Max BrunsfeldandAntonio Scandurra 42e74e7eef Excluded deleted entries when initially sending worktrees to guests
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
2022-12-22 11:18:10 -08:00
Max Brunsfeld 15f666a50a Refresh project collaborator connection id for rejoined projects 2022-12-20 18:03:33 -08:00
Max Brunsfeld 213be3d6bd Delete stale projects after cleanup interval, via server foreign key cascade 2022-12-20 17:27:42 -08:00
Max Brunsfeld 55800fc696 💄 Avoid repeated sql condition in rejoin_room 2022-12-20 17:23:52 -08:00