Skip to content

Conversation

@akshaymankar
Copy link
Member

Checklist

  • Add a new entry in an appropriate subdirectory of changelog.d
  • Read and follow the PR guidelines

@akshaymankar akshaymankar requested review from a team as code owners December 11, 2025 11:22
@zebot zebot added the ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist label Dec 11, 2025
@battermann battermann requested a review from Copilot December 11, 2025 11:23
Copy link
Contributor

Copilot AI left a 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 adds configurable page size and parallelism parameters for the conversation migration from Cassandra to PostgreSQL. The migration previously used hardcoded values (pageSize: 10000), but now allows operators to tune these parameters based on their infrastructure capacity and migration requirements.

Key changes:

  • Introduces MigrationOptions data type with pageSize and parallelism fields
  • Updates migration functions to accept and use configurable options
  • Adds configuration settings in Helm charts and YAML config files
  • Implements parallel processing using unsafePooledMapConcurrentlyN_ for improved migration performance

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
libs/wire-subsystems/src/Wire/ConversationStore/Migration.hs Adds MigrationOptions data type, updates migration functions to accept options, implements parallelism using unsafePooledMapConcurrentlyN_, and adds Concurrency 'Unsafe effect to the effect stack
services/background-worker/src/Wire/MigrateConversations.hs Updates function calls to pass MigrationOptions (incomplete - uses underscore placeholders)
services/background-worker/src/Wire/BackgroundWorker/Options.hs Adds migrateConversationsOptions field to Opts data type
services/background-worker/background-worker.integration.yaml Adds default configuration values for migration options (pageSize: 10000, parallelism: 2)
charts/background-worker/values.yaml Adds migration options configuration to Helm chart defaults
charts/background-worker/templates/configmap.yaml Updates ConfigMap template to include migration options in generated configuration
changelog.d/2-features/faster-migration Documents the new feature with configuration example

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 42 to 43
convLoop <- async . lift $ migrateConvsLoop _ cassClient pgPool logger convMigCounter convMigFinished convMigFailed
userLoop <- async . lift $ migrateUsersLoop _ cassClient pgPool logger userMigCounter userMigFinished userMigFailed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typed hole can't be correct here

Comment on lines -42 to -43
convLoop <- async . lift $ migrateConvsLoop cassClient pgPool logger convMigCounter convMigFinished convMigFailed
userLoop <- async . lift $ migrateUsersLoop cassClient pgPool logger userMigCounter userMigFinished userMigFailed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it compile with holes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, why did you approve it 😅

@akshaymankar akshaymankar merged commit c0ed4b1 into develop Dec 11, 2025
10 checks passed
@akshaymankar akshaymankar deleted the faster-migration branch December 11, 2025 13:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ok-to-test Approved for running tests in CI, overrides not-ok-to-test if both labels exist

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants