[Tickets #12175] Re: ActiveSync misses changes from history database

noreply at bugs.horde.org noreply at bugs.horde.org
Fri Apr 12 12:24:13 UTC 2013


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/12175
------------------------------------------------------------------------------
  Ticket             | 12175
  Updated By         | Thomas Jarosch <thomas.jarosch at intra2net.com>
  Summary            | ActiveSync misses changes from history database
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Assigned
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             | Michael Rubinsky
------------------------------------------------------------------------------


Thomas Jarosch <thomas.jarosch at intra2net.com> (2013-04-12 12:24) wrote:

First draft of needed changes:
-----------------------------------
- Add sequence (=monotonic counter) support to Horde_DB.

   sqlite and MySQL don't support sequences, an example for
   race-free emulation can be found in pear's DB package.

   If this is too much effort, we can implement it in Horde_History
   using one extra table with a primary key and use the last insert id
   as sequence number. The added row is immediately deleted again  
after the insert.
   That's how the emulation works anyway. Probably go this route.

- Add a new unsigned integer row "history_seq" to 'horde_histories' table.
   Every manipulation of a history entry increases this value.

- Horde_History
     - New API call: function getbySequenceId($cmp, $seq, array  
$filters = array(), $parent = null)
     - Each Horde_History_Log entry has a new field 'seq'
     - Adapt getActionTimestamp() to check the sequence number
       if the multiple entries for a guid have the same timestamp

- Extend the API of the following applications:
     - mnemo
     - nag
     - kronolith
     - turba

     API::getChanges($start, $end)
         --> API::getChanges($start, $end, $ts_is_sequence=false)

     API::listBy($action, $timestamp, $notepad = NULL, $end = NULL)
         --> API::listBy($action, $timestamp, $notepad = NULL, $end =  
NULL, $ts_is_sequence=false)

- Adapt ActiveSync code
     - Store last seen sequence number for each device
     - Use new API::getChanges($last_seen_seq, null, true) API
       to collect the changes on the server

- Provide db update scripts
- Unit tests for new Horde_History sequence code
-----------------------------------

Let me know what you think. I'll be gone now till Monday.






More information about the bugs mailing list