SYNC should not use date and time when comparing, but rather revision information
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Tomdroid |
Triaged
|
High
|
Unassigned | ||
Beta |
Triaged
|
High
|
Unassigned |
Bug Description
Clocks can be set wrongly, therefore using date and time to distinguish if a note needs to be pushed or pulled is maybe not a good idea.
It would be better to use a "changed-locally" and "changed-on-server" tag for each note.
From the IRC with timo:
j-4: Dynalon: does the server send anything to tell if the note changed?
j-4: local note-changes can be tracked easily... but what about the remote ones?
Dynalon: yes, the server will send all notes that have changed since the last sync. From what I recall when going through the tomdroid source, you don't use this feature however :-) You can add the ?since=<revision> parameter, it is documented in the API DOCs on https:/
Dynalon: example: http://
Dynalon: you would pass your "latest-
Dynalon: when using the ?since= parameter, you SHOULD use ?since=
Dynalon: but when checking for new/deleted notes, you can use ?include_
Documentation in the Tomboy library:
https:/
summary: |
- SYNC should not use date and time when comparing, but rather revision - information + Slim Down Using These Easy Methods And Tips GARCINIUM |
description: | updated |
description: | updated |
description: | updated |
summary: |
- Slim Down Using These Easy Methods And Tips GARCINIUM + SYNC should not use date and time when comparing, but rather revision + information |
A separate "changed" tag ist not necessary. Tomdroid should work like Tomboy... see the explanation of Timo:
Dynalon: j-4: the global revision number is always selected by the sync server, and will be always the latest sync revision (server wise) + 1 angeDate > Manifest. LastSyncRevisio n
Dynalon: you don't need to store revision-numbers per note, but those revision numbers are only valid locally. I suggest not calling them revision numbers. if you want to store locally when a note changed, jsut mark it as "tainted"
Dynalon: whenever you do a successfull sync, reset all notes to "untainted". whenver you change a note locally, mark it as tainted again. This is only one possible approach
Dynalon: the other one (that tomboy uses) is to not store tainting/local reivsion numbers at all, but make sure the MetadataChangeDate is updated whenver a note is updated
Dynalon: you can then tell if a note was modified since last sync by selecting note.MetadataCh
Dynalon: since you are required to keep metadatachange date accurat on tomdroid, you could just use the later approach and don't need to deal with local per-note revision numbers
Dynalon: anyway, you DO need to keep a list of notes that are deleted (since the notes won't be present upon next sync). AFAIK in tomdroid this is done using system:-Deleted tag, which is just fine
So we should raise the metadatachange whenever a note was edited and on sync obtain a list of edited notes by comparing note.MetadataCh angeDate > Manifest. LastSyncRevisio n.
As easy as this :-)