-
Notifications
You must be signed in to change notification settings - Fork 334
Implement Postgres interpreter for ConversationStore #4764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
9b41958 to
3f46a4d
Compare
53b1c71 to
648ce9c
Compare
fa80140 to
7d4af0f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a PostgreSQL interpreter for ConversationStore, enabling conversation data to be stored in PostgreSQL instead of Cassandra. The purpose is to provide an alternative data storage backend for conversation-related operations while maintaining compatibility with the existing Cassandra implementation.
Key changes include:
- Implementation of a complete PostgreSQL interpreter for
ConversationStoreoperations - Addition of new configuration options to control storage location (Cassandra vs PostgreSQL)
- Removal of deprecated Cassandra-only functionality and code cleanup
Reviewed Changes
Copilot reviewed 61 out of 61 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
libs/wire-subsystems/src/Wire/ConversationStore/Postgres.hs |
New 1,228-line PostgreSQL interpreter implementation for ConversationStore |
services/galley/src/Galley/Options.hs |
Added PostgresMigrationOpts configuration and StorageLocation enum |
services/galley/src/Galley/App.hs |
Integrated PostgreSQL interpreter selection based on configuration |
libs/wire-subsystems/src/Wire/ConversationStore.hs |
Refactored interface to separate MLSCommitLockStore and update method signatures |
| Multiple test files | Updated test code to work with the new conversation store interface |
| Multiple API files | Added PostgreSQL marshalling instances for various data types |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
fisx
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks nice :-)! hope i didn't leave too many comments. i'm not feeling strongly about most of them.
9af8b8d to
ef4193f
Compare
This will allow us to migrate rest of the conversation data to postgres
Also change the Postgres interpreter to do so. In the galley code, this is explicitly being used as an Upsert.
This replaces the use of ListItems.
The pagination can be done with a UNION query (and not a join as the comment suggests), but it causes weird problems due to domain being NULL. We could send the local domain in to always get the domain, but this just causes more work for Postgres. Its probably more efficient to keep what we have.
…eries Its too difficult to do this one, perhaps its ok to send one query per remote domain.
This replaces the use of ListItems with LegacyPaging
…me order as the conv ids
…m /converstions/list-ids
This reverts commit f81eead.
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Matthias Fischmann <[email protected]>
7bd863e to
1be7f26
Compare
https://wearezeta.atlassian.net/browse/WPB-19086
Checklist
changelog.d