[Tickets #12941] AS: Transition to MODSEQ enabled IMAP server

noreply at bugs.horde.org noreply at bugs.horde.org
Wed Jan 29 10:31:35 UTC 2014


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

Ticket URL: http://bugs.horde.org/ticket/12941
------------------------------------------------------------------------------
  Ticket             | 12941
  Created By         | Thomas Jarosch <thomas.jarosch at intra2net.com>
  Summary            | AS: Transition to MODSEQ enabled IMAP server
  Queue              | Synchronization
  Version            | Git master
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


Thomas Jarosch <thomas.jarosch at intra2net.com> (2014-01-29 10:31) wrote:

Hi,

I finally transitioned to a MODSEQ-enabled IMAP server. The cached  
"collection" data is still from the old non-MODSEQ based cyrus server.

Since the transition, the phones won't sync new IMAP messages until I  
reset the collection.
Here's the relevant log:

----------------------------
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177]  
Initializing message diff engine for 0270adeb (INBOX)
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177] Using  
SYNCSTAMP 1390988247 for 0270adeb.
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177]  
Horde_Core_ActiveSync_Driver::getServerChanges(INBOX, 1390806313,  
1390988247, 1389778647, 0)
2014-01-29T10:37:27+01:00 SAMSUNG1358490047903217 INFO: [15177]  
MODSEQ: 0                       <-- this is $folder->modseq()
----------------------------

Let's take a look at Imap/Adapter.php::getMessageChanges() with
     $folder->modseq(): 0
    $modseq: 102

The current code does not handle this case as the non-CONDSTORE sync code path
tests "if ($modseq == 0)".

We also can't change that last condition to "if ($modseq == 0 ||  
$folder->modseq() == 0)" since
the array data layout of $messages or $flags in Folder/Imap.php is  
different for the non-MODSEQ / MODSEQ mode -> we might end up with  
trashed data structures.

Right now I think it's best we should detect the transition and throw  
a Horde_ActiveSync_Exception_StaleState exception.

Thoughts?






More information about the bugs mailing list