Skip to content

sync-manager no longer queues syncs. - #7532

Merged
mhammond merged 1 commit into
mozilla:mainfrom
mhammond:push-tnmstuwmwmpu
Aug 8, 2026
Merged

sync-manager no longer queues syncs.#7532
mhammond merged 1 commit into
mozilla:mainfrom
mhammond:push-tnmstuwmwmpu

Conversation

@mhammond

@mhammond mhammond commented Aug 7, 2026

Copy link
Copy Markdown
Member

There's no need or use-case for syncs queuing up. Any "immediate" requests are time-sensitive, and the chance of a conflict is small.

Shouldn't break consumers. Towards what @segunfamisa and I have been chatting about. cc @jonalmeida, and @bendk and @gruberb re the async discussions (sync-manager has never had a coroutine wrapper iiuc, so has always been blocking for android (ie, not actually "async", which is unusual and was a TIL 😅). Maybe relevant to the async modeling?)

See also https://bugzilla.mozilla.org/show_bug.cgi?id=2061666

Pull Request checklist

  • Breaking changes: This PR follows our breaking change policy
    • This PR follows the breaking change policy:
      • This PR has no breaking API changes, or
      • There are corresponding PRs for our consumer applications that resolve the breaking changes and have been approved
  • Quality: This PR builds and tests run cleanly
    • Note:
      • For changes that need extra cross-platform testing, consider adding [ci full] to the PR title.
      • If this pull request includes a breaking change, consider cutting a new release after merging.
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Changelog: This PR includes a changelog entry in CHANGELOG.md or an explanation of why it does not need one
    • Any breaking changes to Swift or Kotlin binding APIs are noted explicitly
  • Dependencies: This PR follows our dependency management guidelines
    • Any new dependencies are accompanied by a summary of the due diligence applied in selecting them.

@mhammond
mhammond requested a review from bendk August 7, 2026 14:11
@mhammond
mhammond force-pushed the push-tnmstuwmwmpu branch from a106978 to 9cd898c Compare August 7, 2026 14:12

@bendk bendk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I could see there being a use-case for something like queuing up a sync: I make a change to some engine and want to make sure other clients see it ASAP. In that case, if there's a sync going, I still might want to queue another one since that the sync for my engine might have already happened.

However, that's not needed right now and I don't think SyncManager::sync() is the method we would want to use for that anyways, so this change seems great to me.

@mhammond

mhammond commented Aug 8, 2026

Copy link
Copy Markdown
Member Author

I still might want to queue another one

yeah, but this does kinda sound app specific, so having that in the Kotlin WorkManager makes some sense - eg, things like cancellation etc and other platform specific considerations are possible.

Ideal would be to allow multiple syncs to run concurrently, locking each engine, not the entire sync? That's likely somewhat possible, but not at all trivial.

There's no need or use-case for syncs queuing up. Any "immediate" requests
are time-sensitive, and the chance of a conflict is small.
@mhammond
mhammond force-pushed the push-tnmstuwmwmpu branch from 9cd898c to 988aec1 Compare August 8, 2026 10:38
@mhammond
mhammond enabled auto-merge August 8, 2026 10:49
@mhammond
mhammond added this pull request to the merge queue Aug 8, 2026
Merged via the queue into mozilla:main with commit 7a8e76f Aug 8, 2026
14 checks passed
@mhammond
mhammond deleted the push-tnmstuwmwmpu branch August 8, 2026 11:19
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.

2 participants