[tomboy-list] Note deletion and sync
hald at icandy.de
Wed May 26 03:13:28 PDT 2010
Sandy Armstrong wrote:
> On Sun, May 23, 2010 at 8:55 AM, Cornelius Hald <hald at icandy.de> wrote:
>> Sure, I'll file a bug, but first I should understand what's going on
>> because I'm not sure I really understood for what we need separated note
>> revisions plus a latest-sync-revision. Could you explain that or point
>> me to a document where I can learn more about the sync algorithm and the
>> usage of revisions?
> Sure, this one is easy. Let's say the global revision is 20 (after
> adding one new note). Client A and Client B are fully synchronized.
> On Client A, I delete the new note from rev 20 and sync. A proper
> server would record this as revision 21, so that Client B knows there
> are changes and can ask for specific changes since rev 20. In the U1
> case, the global rev goes down to 19.
> Now, here is where the problems start. Let's say Client A modifies a
> note and syncs (we're at rev 20 again on the server), and then
> modifies a different note and syncs (rev 21 on server). When Client B
> gets around to doing a sync, it asks for changes since rev 20, and all
> it sees is the modification made in rev 21. It doesn't know to ask
> for an update to the note modified in the new rev 20.
> Hopefully this makes sense. And it's just one example of why a proper
> global revision for the note collection is necessary.
Yea, makes sense now :) Thanks for the detailed explanation. I´ll do
some more testing and I´ll file a bug and report back here.
>>> I'd have to read some Tomboy code to see what happens if the sync rev
>>> is less than what we expect. We may just error out.
>> I didn't look at the code, but it seems that Tomboy decreases the local
>> revision silently. I've copied that behavior, because earlier I just
>> aborted sync at that point until some users complained about the "Server
>> revision older than local revision" error. If I ignore that condition
>> everything seems to work fine.
> I'll have to look at the code and get back to you. That's interesting to me.
If you have anything new, please let me know.
More information about the Tomboy-list