-
Notifications
You must be signed in to change notification settings - Fork 800
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
Full Sync: Don't allow more than one request to enqueue #14039
Conversation
This is an automated check which relies on |
I tested per the instructions and tried to trick it up a bit through scheduling full syncs via the debugger. No errors, the syncs appeared complete. |
Thank you @kraftbj ! |
* Add products endpoint * [not verified] Add error code * Update _inc/lib/class.core-rest-api-endpoints.php Co-Authored-By: Marin Atanasov <8436925+tyxla@users.noreply.github.com> * Update _inc/lib/class.core-rest-api-endpoints.php Co-Authored-By: Marin Atanasov <8436925+tyxla@users.noreply.github.com> * Add QueryProducts data component and corresponding Redux and rest API calls * Update _inc/client/state/site/reducer.js Co-Authored-By: Marin Atanasov <8436925+tyxla@users.noreply.github.com> * [not verified] Add SingleProductBackupBody component * [not verified] Rename plans-section__body to single_product_backup__body * [not verified] Give class name to h4 tag * [not verified] Remove single_product_backup__body * [not verified] Check for upgradeLinks and upgradeTitles before using them * [not verified] Switch function style * [not verified] Add key to PlanRadioButton * Remove duplicate definition of getProducts * Allow TOS agreement before Jetpack is fully active so we track… (#14041) * Allow TOS agreement before Jetpack is fully active so we track the connection flow * Update packages/terms-of-service/src/class-terms-of-service.php Co-Authored-By: Derek Smart <smart@automattic.com> * Also update the action that is being called in jetpack We renamed the action lets also rename it in Jetpack. * [not verified] Revert "Also update the action that is being called in jetpack" This reverts commit e9c0f21. Co-authored-by: Brandon Kraft <public@brandonkraft.com> Co-authored-by: Enej Bajgoric <enej.bajgoric@gmail.com> * Removed Jetpack references in the IXR client. (#14046) This change allows the package to be used outside of Jetpack, relying on the methods provided by the Manager, plus using the WP_Error class instead of the Jetpack_Error wrapper. * Full Sync: Don't allow more than one request to enqueue (#14039) * Spell checking CI integration (#13992) * Adds spell checking and fixes files. This implements a package to spellcheck files, and does a pass to ensure everything is green. * [not verified] Implements Travis check for spelling Adds Yarn script and Travis CI for spell checking. * [not verified] Fixes feedback. Updates docs to prevent spelling exceptions for certain files. * Export SingleProductBackupBody class * [not verified] No need to export single product backup body
* 8.0 Release: running changelog * Changelog: add #13921 * Changelog: add #13980 * Changelog: add #13905 * Changelog: add #13971 * Changelog: add #13984 * Changelog: add #14009 * Changelog: add #13620 * Remove things that will ship in 7.9.1 * Changelog: add 7.9.1 release (#14044) * Changelog: add base for 7.9.1 release * Update release date and post link * Changelog: add #14066 * Update changelog for 7.9.1 * Changelog: add #13405 * Changelog: add #13841 * Changelog: add #13924 * Changelog: add #13986 * Changelog: add #14010, #14028, #14053, #14055. * Changelog: add #14054 * Changelog: add #14031 * Changelog: add #14039 * Changelog: add #14050 * Changelog: add #14070 * Changelog: add #14082 * Changelog: add #14084 * Changelog: add #14111 * Changelog: add #13961 * Changelog: add #14047 * Changelog: add #14091 * Changelog: add #14108 * Changelog: add #14121
This PR introduces a Lock so a site can't have two process enqueuing and modifying the enqueue status at the same time.
In consequence it allow us to remove unnecessary rechecks like
can_add_to_queue
while looping through the different Sync Modules.This PR is extracting improvements we did in #13963 that are not related to the main problem that other PR is trying to solve.
How to Test
Full_Sync->enqueue
method and make itsleep()
for some seconds.wp-admin
a couple of timesenque
is not hit twice concurrently🤔