Skip to content
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

Multisite context switch support to SyncManager #3689

Merged
merged 4 commits into from
Oct 6, 2023

Conversation

felipeelia
Copy link
Member

This is a takeover of #3503

This commit adds support for Multisite context switching to the SyncManager class. This allows it to index the content to the correct site when indexing in the shutdown hook.

The commit introduces two methods in the SyncManager class: get_sync_queue and reset_sync_queue. The get_sync_queue method returns the sync queue for the current site or the $blog_id. The reset_sync_queue method resets the sync queue for the current site or the $blog_id.

This commit also updates all the dependent tests to use the new methods.

Description of the Change

Closes #3471

How to test the Change

Changelog Entry

Changed - SyncManager array queues are now indexed by the blog ID

Credits

Props @sathyapulse and @felipeelia

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

sathyapulse and others added 2 commits June 20, 2023 14:11
This commit adds support for Multisite context switching to the SyncManager class.
This allows it to index the content to the correct site when indexing in the shutdown hook.

The commit introduces two methods in the SyncManager class: `get_sync_queue` and `reset_sync_queue`.
The `get_sync_queue` method returns the sync queue for the current site or the `$blog_id`.
The `reset_sync_queue` method resets the sync queue for the current site or the `$blog_id`.

This commit also updates all the dependent tests to use the new methods.

Fixes #3471 issue.
@felipeelia felipeelia added this to the 5.0.0 milestone Oct 6, 2023
@felipeelia felipeelia linked an issue Oct 6, 2023 that may be closed by this pull request
1 task
@felipeelia felipeelia merged commit d371504 into 5.0.0 Oct 6, 2023
9 checks passed
@felipeelia felipeelia deleted the bug/multisite_context_switch_support branch October 6, 2023 15:38
rebeccahum added a commit to Automattic/ElasticPress that referenced this pull request Oct 10, 2023
rebeccahum added a commit to Automattic/ElasticPress that referenced this pull request May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Sync not working properly with multisite
2 participants