Commit Graph
6822 Commits
Author SHA1 Message Date
Antonio Scandurra b3e7eea7e5 Rename Store to ConnectionPool 2022-11-17 19:03:59 +01:00
Antonio Scandurra 0bb9fe84c6 Remove obsolete code from Store 2022-11-17 18:46:39 +01:00
Antonio ScandurraandNathan Sobo b1e7672b2b WIP: Introduce a db field to Session
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-17 17:30:26 +01:00
Antonio ScandurraandNathan Sobo f0dd39a3d2 Introduce a new Session struct to server message handlers
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-17 17:11:06 +01:00
Antonio Scandurra 1e3cb72b20 Revert "Don't replace newer diagnostics with older ones"
This reverts commit b55a13831a.
2022-11-17 16:57:40 +01:00
Antonio Scandurra 915b7280d4 Revert "Wait for previous UpdateFollowers message ack before sending new ones"
This reverts commit ceb40613bc.
2022-11-17 16:57:32 +01:00
Antonio Scandurra 9e4ce5afa8 Use int8 for scan_id and inode in Postgres 2022-11-17 16:56:43 +01:00
Antonio Scandurra 6cf8013f9e 🎨 2022-11-17 15:35:18 +01:00
Antonio Scandurra be76c9430e Fix seed script 2022-11-17 15:34:35 +01:00
Antonio Scandurra 3388db42e9 Fix errors in Postgres schema 2022-11-17 15:34:12 +01:00
Antonio Scandurra ceb40613bc Wait for previous UpdateFollowers message ack before sending new ones 2022-11-17 14:12:00 +01:00
Antonio Scandurra d3e2d26050 Remove unwrap from Server::share_project 2022-11-17 13:33:26 +01:00
Antonio Scandurra b55a13831a Don't replace newer diagnostics with older ones 2022-11-17 12:21:51 +01:00
Antonio Scandurra 6eab8578f0 Use Db::get_guest_connection_ids in other db methods 2022-11-17 11:38:00 +01:00
Nathan Sobo 0b4b99140b Fix column name in query 2022-11-16 19:40:53 -07:00
Nathan Sobo 715cb4527a Move unshare_project to db module 2022-11-16 18:28:45 -07:00
Nathan Sobo 42c0288c9f Move leave_project from Store to db module 2022-11-16 17:45:47 -07:00
Nathan Sobo fcc6b162d9 Fix typo in query 2022-11-16 16:52:05 -07:00
cb4b4102fe WIP: Allow subscribing to remote entity before creating a model
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
Co-Authored-By: Max Brunsfeld <max@zed.dev>
2022-11-16 19:51:24 +01:00
Antonio ScandurraandNathan Sobo bfc6c566db Batch some of the new queries in Db
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-16 17:19:06 +01:00
Antonio Scandurra d054ca68e9 Wait for acknowledgment before sending the next diagnostic summary 2022-11-16 16:03:01 +01:00
Antonio Scandurra a079fb5626 Move Store::start_language_server to Db 2022-11-16 15:48:26 +01:00
Antonio Scandurra 2ed5ed1466 Move Store::update_diagnostic_summary to Db 2022-11-16 15:41:33 +01:00
Antonio Scandurra 54fc129e60 Send worktree updates after project metadata has been sent 2022-11-16 14:58:11 +01:00
Antonio Scandurra e67db4af97 Improve queries for composite primary keys 2022-11-16 11:07:39 +01:00
Antonio Scandurra 4bb2f7f7fb Cascade deletes when project is deleted 2022-11-16 10:41:36 +01:00
Antonio Scandurra bab3cc1559 Correctly leave projects when leaving room 2022-11-16 10:36:48 +01:00
Antonio Scandurra 9c7d7be35d Update worktree entry instead of erroring when it already exists 2022-11-16 08:57:19 +01:00
Antonio Scandurra d212d37a65 Fix syntax error in schema 2022-11-15 18:02:07 +01:00
Antonio Scandurra 0de552ae98 Always use the database to retrieve collaborators for a project 2022-11-15 17:49:37 +01:00
Antonio Scandurra 2521e230cd Move Store::update_worktree to Db::update_worktree 2022-11-15 17:18:28 +01:00
Antonio ScandurraandNathan Sobo bf3e4936b5 Always use strings to represent paths over the wire
Previously, the protocol used a mix of strings and bytes without any consistency.

When we go to multiple platforms, we won't be able to mix encodings of paths anyway.
We don't know this is the right approach, but it at least makes things consistent
and easy to read in the database, on the wire, etc. Really, we should be using entry
ids etc to refer to entries on the wire anyway, but there's a chance this is the
wrong decision.

Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-15 16:46:17 +01:00
Antonio ScandurraandNathan Sobo ae2c64f47f Move Store::join_project to Db::join_project
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-15 16:37:51 +01:00
Antonio Scandurra c05e029a58 Start reworking join_project to use the database 2022-11-15 11:44:26 +01:00
Antonio Scandurra 93732c35a6 Determine whether a contact is busy via the database 2022-11-15 10:41:21 +01:00
Antonio Scandurra 2de5763d4d Finish implementing Db::update_project 2022-11-15 09:01:51 +01:00
Antonio Scandurra 142a91677a Add random delay after returning results from the database 2022-11-15 08:48:16 +01:00
Antonio ScandurraandNathan Sobo e23a19eed3 Switch to serializable isolation
Co-Authored-By: Nathan Sobo <nathan@zed.dev>
2022-11-14 19:39:12 +01:00
Antonio Scandurra 75dcc65ac9 Skip applying room updates if they're older than the local room state 2022-11-14 15:35:39 +01:00
Antonio Scandurra 05b8ba4fd0 Wait for acknowledgment before sending the next project update 2022-11-14 15:32:49 +01:00
Antonio Scandurra b53f82ab29 Automatically decline call when user drops their last connection 2022-11-14 11:32:26 +01:00
Antonio Scandurra 4077b94609 Implement Db::cancel_call 2022-11-14 11:12:23 +01:00
Antonio Scandurra 184d5ca6a8 Fix query errors in Db::share_project 2022-11-14 10:53:11 +01:00
Antonio Scandurra 1f0709bbef Leave room when connection is dropped 2022-11-14 10:13:36 +01:00
Antonio Scandurra ae0252166b WIP 2022-11-11 19:36:20 +01:00
Antonio Scandurra 86271d9696 Remove stray log statement 2022-11-11 18:54:08 +01:00
Antonio Scandurra 2c71132d69 Get basic calls test passing again 2022-11-11 18:53:23 +01:00
Antonio Scandurra fb3b16917b WIP: Move Store::leave_room to Db::leave_room 2022-11-11 16:59:54 +01:00
Antonio Scandurra d55e420826 Move Store::decline_call to Db::decline_call 2022-11-11 15:41:56 +01:00
Antonio Scandurra 6406495a37 Remove calls table and use just room_participants 2022-11-11 15:22:04 +01:00