[GH-ISSUE #406] Floccus Replication Process Reverses Housekeeping Changes #316

Closed
opened 2026-02-25 22:36:47 +03:00 by kerem · 11 comments
Owner

Originally created by @sproggit on GitHub (Nov 17, 2019).
Original GitHub issue: https://github.com/floccusaddon/floccus/issues/406

Scenario:-
Workstation running Firefox 70.0.1; NextCloud 17.0.1 with BookMarks 2.3.1. Floccus connected and working in bi-directional mode.

Consider a fictional scenario in which the Firefox client as a bookmark in it's "Bookmarks Menu" folder (say www.cnn.com) and an empty folder, directly inside "Bookmarks Menu", with the name "News".

Steps to Reproduce Bug:-
On the workstation, use Firefox Editor to move the "www.cnn.com" bookmark, placing it in the "News" folder. Allow Floccus sync to occur.
On the workstation, observe that the bookmark for "www.cnn.com" has re-appeared in the "Bookmarks Menu" folder, because the server is replication that content alignment to the workstation, even though the "edit date" of the change on the workstation is more recent.

Bug Consistency:-
So far, reliable/frequently observed. Not sure if 100%, but definitely a repeating issue.

Expected Result:-
When Floccus and Bookmark Manager compare data sets during synchronisation, expected behaviour is for the client and server components to figure out which "side" of each data inconsistency has the most recent change and then respect that change.

This would require:-

  1. Both Floccus and the Bookmark Application in NextCloud to record the date by which entries are created/edited
  2. Comparison of last-edit datestamps to ensure that the most recent change is respected
  3. "Deletions" (whether they be true deletions or entry moving) from any given node in the data tree should be recorded in a "deleted" file, such that the replication process can detect the fact that the most recent change was the deletion of the element and replication the deletion across, not blindly restore the content back again...

I have no personal knowledge of the code, but this is how, for example, Lotus Notes managed replication of data between a central Notes database and a user local copy. In the event that both editions of a file changed at the time of replication, it was possible to configure the replicator to implement the most recent change, but preserve a copy of the old version in case the out-dated edit needed to be restored. I think this is pretty similar to the way that, for example, git manages merges.

Originally created by @sproggit on GitHub (Nov 17, 2019). Original GitHub issue: https://github.com/floccusaddon/floccus/issues/406 Scenario:- Workstation running Firefox 70.0.1; NextCloud 17.0.1 with BookMarks 2.3.1. Floccus connected and working in bi-directional mode. Consider a fictional scenario in which the Firefox client as a bookmark in it's "Bookmarks Menu" folder (say www.cnn.com) and an empty folder, directly inside "Bookmarks Menu", with the name "News". Steps to Reproduce Bug:- On the workstation, use Firefox Editor to move the "www.cnn.com" bookmark, placing it in the "News" folder. Allow Floccus sync to occur. On the workstation, observe that the bookmark for "www.cnn.com" has re-appeared in the "Bookmarks Menu" folder, because the server is replication that content alignment to the workstation, even though the "edit date" of the change on the workstation is more recent. Bug Consistency:- So far, reliable/frequently observed. Not sure if 100%, but definitely a repeating issue. Expected Result:- When Floccus and Bookmark Manager compare data sets during synchronisation, expected behaviour is for the client and server components to figure out which "side" of each data inconsistency has the most recent change and then respect that change. This would require:- 1. Both Floccus and the Bookmark Application in NextCloud to record the date by which entries are created/edited 2. Comparison of last-edit datestamps to ensure that the most recent change is respected 3. "Deletions" (whether they be true deletions or entry moving) from any given node in the data tree should be recorded in a "deleted" file, such that the replication process can detect the fact that the most recent change was the deletion of the element and replication the deletion across, not blindly restore the content back again... I have no personal knowledge of the code, but this is how, for example, Lotus Notes managed replication of data between a central Notes database and a user local copy. In the event that both editions of a file changed at the time of replication, it was possible to configure the replicator to implement the most recent change, but preserve a copy of the old version in case the out-dated edit needed to be restored. I think this is pretty similar to the way that, for example, git manages merges.
Author
Owner

@marcelklehr commented on GitHub (Nov 18, 2019):

Hey!
Thanks for your detailed feedback! :)
The scenario you describe is indeed quite crucial and it's thus one of the scenarios that are tested automatically in the travis CI test runner on every commit. Which floccus version and which sync method are you using?

<!-- gh-comment-id:555019692 --> @marcelklehr commented on GitHub (Nov 18, 2019): Hey! Thanks for your detailed feedback! :) The scenario you describe is indeed quite crucial and it's thus one of the scenarios that are tested automatically in the travis CI test runner on every commit. Which floccus version and which sync method are you using?
Author
Owner

@sproggit commented on GitHub (Nov 18, 2019):

Marcel,
I am really sorry that I did not include that in my notes.

I am using Floccus 3.5.1.

I have it set up in "Merge" Mode - which is showing in the options/parameters as "recommended".

For what it is worth... I have 3-4 workstations at home that I use regularly, a mix of Mint Linux, Mac and Windows. I also have a small cluster of Raspberry Pi board-systems. I have NextCloud running on one of my Raspberry Pis, with one of the main reasons for doing this being to synchronize my bookmarks, so that regardless of which home computer I use, I can access all my bookmarks.

I choose to use this method rather than say iCloud or Mozilla Sync because I do not trust the security of external/public cloud sources.

I understand the principles of bi-directional replication in "merge", but what I thought might be an unintended result was the way that it seems to be undoing changes I am trying to make. Happy to experiment further and provide more details/results if this is indeed a bug and you need more triage data.

Thank you

<!-- gh-comment-id:555055299 --> @sproggit commented on GitHub (Nov 18, 2019): Marcel, I am **really** sorry that I did not include that in my notes. I am using Floccus 3.5.1. I have it set up in "Merge" Mode - which is showing in the options/parameters as "recommended". For what it is worth... I have 3-4 workstations at home that I use regularly, a mix of Mint Linux, Mac and Windows. I also have a small cluster of Raspberry Pi board-systems. I have NextCloud running on one of my Raspberry Pis, with one of the main reasons for doing this being to synchronize my bookmarks, so that regardless of which home computer I use, I can access all my bookmarks. I choose to use this method rather than say iCloud or Mozilla Sync because I do not trust the security of external/public cloud sources. I understand the principles of bi-directional replication in "merge", but what I thought might be an unintended result was the way that it seems to be undoing changes I am trying to make. Happy to experiment further and provide more details/results if this is indeed a bug and you need more triage data. Thank you
Author
Owner

@sproggit commented on GitHub (Nov 18, 2019):

Marcel,
Sorry - one more footnote... When I realised what was happening (i.e. if I moved a data item in to a folder, replication would put it back rather than replicating the move, I started a different approach...

In my different approach, I have a browser window open on the NextCloud Bookmark Manager and I also have the "Show All BookMarks" window open on Firefox. To move a bookmark in to a folder (i.e. to tidy up my list of unsorted bookmarks) I then move it within the NextCloud Bookmark Manager and then immediately afterwards I make exactly the same change in my Firefox browser.

I have found that if I work like this, everything behaves as expected and my change is not "repaired".

But I do have to manually change both Server and Client side at the same time. Hope that additional information is helpful.

<!-- gh-comment-id:555060341 --> @sproggit commented on GitHub (Nov 18, 2019): Marcel, Sorry - one more footnote... When I realised what was happening (i.e. if I moved a data item in to a folder, replication would put it back rather than replicating the move, I started a different approach... In my different approach, I have a browser window open on the NextCloud Bookmark Manager and I also have the "Show All BookMarks" window open on Firefox. To move a bookmark in to a folder (i.e. to tidy up my list of unsorted bookmarks) I then move it within the NextCloud Bookmark Manager and then immediately afterwards I make **exactly** the same change in my Firefox browser. I have found that if I work like this, everything behaves as expected and my change is not "repaired". But I do have to manually change both Server and Client side at the same time. Hope that additional information is helpful.
Author
Owner

@marcelklehr commented on GitHub (Nov 18, 2019):

Thanks for the additional information. Could you provide a debug log of an unsuccessful run as explained in the issue template

<!-- gh-comment-id:555090558 --> @marcelklehr commented on GitHub (Nov 18, 2019): Thanks for the additional information. Could you provide a debug log of an unsuccessful run as explained in the [issue template](https://github.com/marcelklehr/floccus/blob/develop/.github/ISSUE_TEMPLATE/bug_report.md)
Author
Owner

@sproggit commented on GitHub (Nov 18, 2019):

Marcel,
When i attempt to generate the debug log, I click on the link as per the directions in the issue template, but nothing actually happens. When I hover or click on the link, Firefox tells me that the link references:-

moz-extension://d477a8ae-8e60-428f-8846-d894ae5b0424/dist/htnl/options.html#

If I right-click on "Debug Logs" and then select either a new tab or a new private window, I am simply returned to the "Bookmarks Menu", with the status showing "All good".

I am unable to generate any form of Debug Log (unless, of course, I am doing something wrong...).

Happy to try again/something different if this is just me being stupid.

Sorry...

if it helps, I have created a sequential series of screen shots, which I've marked up and annotated, that show the process through from start to a broken finish. The only thing is, when I created them just now, I got a slightly different [but still broken] result...

<!-- gh-comment-id:555166741 --> @sproggit commented on GitHub (Nov 18, 2019): Marcel, When i attempt to generate the debug log, I click on the link as per the directions in the issue template, but nothing actually happens. When I hover or click on the link, Firefox tells me that the link references:- moz-extension://d477a8ae-8e60-428f-8846-d894ae5b0424/dist/htnl/options.html# If I right-click on "Debug Logs" and then select either a new tab or a new private window, I am simply returned to the "Bookmarks Menu", with the status showing "All good". I am unable to generate any form of Debug Log (unless, of course, I am doing something wrong...). Happy to try again/something different if this is just me being stupid. Sorry... if it helps, I have created a sequential series of screen shots, which I've marked up and annotated, that show the process through from start to a broken finish. The only thing is, when I created them just now, I got a slightly different [but still broken] result...
Author
Owner

@marcelklehr commented on GitHub (Nov 18, 2019):

The link "debug logs" in the options panel should trigger a download of the log file. You're welcome to post the screenshot here, or email it to me (see my profile page) -- anything that helps :)

<!-- gh-comment-id:555254857 --> @marcelklehr commented on GitHub (Nov 18, 2019): The link "debug logs" in the options panel should trigger a download of the log file. You're welcome to post the screenshot here, or email it to me (see my profile page) -- anything that helps :)
Author
Owner

@marcelklehr commented on GitHub (Dec 10, 2019):

Any news here? Have you been able to obtain a debug log file?

<!-- gh-comment-id:564205266 --> @marcelklehr commented on GitHub (Dec 10, 2019): Any news here? Have you been able to obtain a debug log file?
Author
Owner

@sproggit commented on GitHub (Dec 10, 2019):

Marcel,

I am really sorry, work has overtaken me. However, in theory I start a vacation this Friday, so I should be able to get to this over the weekend. Thank you for the reminder...

I will try to get something to you then.

Thank you

Clive

Sent from my iPad

On 10 Dec 2019, at 19:26, Marcel Klehr notifications@github.com wrote:



Any news here? Have you been able to obtain a debug log file?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com/marcelklehr/floccus/issues/406?email_source=notifications&email_token=ABBE4TSBM2GAXYRKL7N3HBDQX7UOHA5CNFSM4JOLLUKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGQRNUQ#issuecomment-564205266, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABBE4TWNGONLD4C3K7R3L6DQX7UOHANCNFSM4JOLLUKA.

<!-- gh-comment-id:564279661 --> @sproggit commented on GitHub (Dec 10, 2019): Marcel, I am really sorry, work has overtaken me. However, in theory I start a vacation this Friday, so I should be able to get to this over the weekend. Thank you for the reminder... I will try to get something to you then. Thank you Clive Sent from my iPad On 10 Dec 2019, at 19:26, Marcel Klehr <notifications@github.com> wrote:  Any news here? Have you been able to obtain a debug log file? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub<https://github.com/marcelklehr/floccus/issues/406?email_source=notifications&email_token=ABBE4TSBM2GAXYRKL7N3HBDQX7UOHA5CNFSM4JOLLUKKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGQRNUQ#issuecomment-564205266>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ABBE4TWNGONLD4C3K7R3L6DQX7UOHANCNFSM4JOLLUKA>.
Author
Owner

@marcelklehr commented on GitHub (Dec 15, 2019):

I think I'm on to this one, some changes are reversed, when the sync process kicks in while you're still making changes. I'll add a cancel mechanism to stop sync when the user starts changing things.

<!-- gh-comment-id:565845790 --> @marcelklehr commented on GitHub (Dec 15, 2019): I think I'm on to this one, some changes are reversed, when the sync process kicks in while you're still making changes. I'll add a cancel mechanism to stop sync when the user starts changing things.
Author
Owner

@marcelklehr commented on GitHub (Dec 17, 2019):

Say hello too v3.5.3 which should fix this :)

<!-- gh-comment-id:566402823 --> @marcelklehr commented on GitHub (Dec 17, 2019): Say hello too v3.5.3 which should fix this :)
Author
Owner

@github-actions[bot] commented on GitHub (Mar 21, 2023):

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

<!-- gh-comment-id:1477257318 --> @github-actions[bot] commented on GitHub (Mar 21, 2023): This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/floccus#316
No description provided.