Closed Bug 1552382 Opened 6 years ago Closed 4 years ago

Don't log "0 outgoing items pre-reconciliation" in the new bookmarks engine

Categories

(Firefox :: Sync, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: lina, Assigned: bdk)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We'll log this for every sync with the new engine:

1558001468439 Sync.Engine.Bookmarks INFO 0 outgoing items pre-reconciliation

Since we don't use _reconcile, we don't know how many outgoing items we have until we've finished applying and merging everything—at which point we fill out outgoing changeset. In contrast, the old engine fills the changeset before downloading, so it'll have the right count.

The priority flag is not set for this bug.
:markh, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(markh)
Blocks: 1433177
Type: defect → enhancement
Flags: needinfo?(markh)
Priority: -- → P3

This is a bit painful - the message is logged in the "base class" of the engines at https://searchfox.org/mozilla-central/rev/5e70cd673a0ba0ad19b662c1cf656e0823781596/services/sync/modules/engines.js#1194. You will notice it ends up coming from the result of pullChanges() but looking in bookmarks.js you will see that engine always returns an empty object.

Just logging when there are non-zero changes doesn't seem correct - we probably want to keep logging for other engines even when there are zero. I had an idea how we could do some hacks so only bookmarks doesn't log this, but on reflection, I don't think the "pre reconcile" part actually matters and that it's reasonable for all engines to just log this post-reconcile.

And engines do that - but at trace level, which isn't ideal. So I think this really is just:

New tests will not be necessary for this change and it's extremely unlikely any tests would fail, but you should (a) run tests in services/sync locally and (b) push a "try" run (which might turn into its own adventure of getting hg access etc)

  • Don't log pre-reconciliation outgoing item count. Always outputs 0 for bookmarks and
    it's not needed for other engines.
  • Updated the post-reconciliation outgoing item count log so that it can
    be used instead of the pre-reconciliation log item:
    • Always log, even when the count is 0
    • Change log level to INFO
    • Changed wording "Preparing" -> "Uploading"
Assignee: nobody → bdeankawamura
Status: NEW → ASSIGNED
Attachment #9218451 - Attachment description: WIP: Bug 1552382: Updating sync engine logging → Bug 1552382: Updating sync engine logging. r=markh
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: