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

Prevent duplicate nodes from reconnect and refine reset to make sure deleted record is sent #1135

Merged
merged 1 commit into from
Dec 19, 2018

Conversation

darkdh
Copy link
Member

@darkdh darkdh commented Dec 18, 2018

kSyncPrevSeed is saved when reset and then will be clear during OnSaveInitData for create/connect sync chain
ResetSyncInternal is introduced for making sure the final delete record is sent and resolved.

fix brave/brave-browser#2443
fix brave/brave-browser#2527

Submitter Checklist:

  • Submitted a ticket for my issue if one did not already exist.
  • Used Github auto-closing keywords in the commit message.
  • Added/updated tests for this change (for new code or code which already has tests).
  • Verified that these changes build without errors on
    • Windows
    • macOS
    • Linux
  • Verified that these changes pass automated tests (npm test brave_unit_tests && npm test brave_browser_tests) on
    • Windows
    • macOS
    • Linux
  • Ran git rebase master (if needed).
  • Ran git rebase -i to squash commits (if needed).
  • Tagged reviewers and labelled the pull request as needed.
  • Request a security/privacy review as needed.
  • Add appropriate QA labels (QA/Yes or QA/No) to include the closed issue in milestone

Test Plan:

  1. Create sync chain from device A and create bookmarks like this
f1 -|
    |- f2
    |- b1
  1. Connect to the sync chain from device B and device C
  2. Wait for devices list and bookmarks synced on all devices
  3. Remove device C on device C by click "x" or "leave sync chain" (self deleted)
  4. Make sure device C get deleted on device A and device B
  5. Delete b1 from device A
  6. Connect device C to the sync chain which contains device A and device B again
  7. Make sure device C has bookmarks like this
f1 -|
    |- f2
  1. Add b2 to device C to prove it is syncing with the sync chain like this
f1 -|
    |- f2
    |- b2
  1. Make sure all devices have bookmarks like above structure
  2. Remove device C on device C by click "x" or "leave sync chain" (self deleted)
  3. Make sure device C get deleted on device A and device B
  4. Create sync chain on device C and connect device D to it /create sync chain on device D and connect device C to it (Connect/Create different chain)
  5. Make sure device D has bookmarks like this
f1 -|
    |- f2
    |- b2

Reviewer Checklist:

  • New files have MPL-2.0 license header.
  • Request a security/privacy review as needed.
  • Adequate test coverage exists to prevent regressions
  • Verify test plan is specified in PR before merging to source

Copy link
Contributor

@AlexeyBarabash AlexeyBarabash left a comment

Choose a reason for hiding this comment

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

++

@AlexeyBarabash
Copy link
Contributor

This PR also addresses https://github.com/brave/browser-android-tabs/issues/924 .

@darkdh darkdh merged commit c5ee622 into master Dec 19, 2018
darkdh added a commit that referenced this pull request Dec 19, 2018
Prevent duplicate nodes from reconnect and refine reset to make sure deleted record is sent
@darkdh
Copy link
Member Author

darkdh commented Dec 19, 2018

master: c5ee622
0.60.x: 27f2159

@darkdh darkdh deleted the sync-delete-reset branch December 19, 2018 19:18
@rebron
Copy link
Collaborator

rebron commented Dec 19, 2018

Deliberated with @kjozwiak. Marking approved for uplift to 59.x

darkdh added a commit that referenced this pull request Dec 19, 2018
Prevent duplicate nodes from reconnect and refine reset to make sure deleted record is sent
@darkdh
Copy link
Member Author

darkdh commented Dec 19, 2018

0.59.x: ddede29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants