Open Bug 1586172 Opened 6 years ago Updated 3 years ago

Fix handling of duplicate and missing child GUIDs in the bookmarks mirror

Categories

(Firefox :: Sync, defect, P3)

defect

Tracking

()

Tracking Status
firefox69 --- disabled
firefox70 --- wontfix
firefox71 --- affected

People

(Reporter: lina, Unassigned)

References

(Blocks 1 open bug)

Details

Several errors like these are showing up in telemetry:

Error: Error(s) encountered during statement execution: NOT NULL constraint failed: structure.guid
Error: Error(s) encountered during statement execution: UNIQUE constraint failed: structure.parentGuid, structure.guid

I was worried it might be our chunking logic for inserting children, but that has tests, and I tried other limits (998, 999, 1998) just in case. The only other thing I can think of is, we have children with nulls and duplicate GUIDs.

We can do a few things to fix this:

  • Filter out null and non-string GUIDs, and set the validity state to Reupload. @lyuyuan fixed this in a-s in https://github.com/mozilla/application-services/pull/1661.
  • Change the structure table to have PRIMARY KEY(guid, parentGuid, position). Dogear already handles duplicates in the same folder correctly—it'll keep the item at the first position, and flag the item and folder for reupload.
Blocks: 1586421
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.