Summary | AS: Transition to MODSEQ enabled IMAP server |
Queue | Synchronization |
Queue Version | Git master |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | mrubinsk (at) horde (dot) org |
Requester | thomas.jarosch (at) intra2net (dot) com |
Created | 01/29/2014 (4172 days ago) |
Due | |
Updated | 01/31/2014 (4170 days ago) |
Assigned | 01/29/2014 (4172 days ago) |
Resolved | 01/31/2014 (4170 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | Yes |
commit 5d55e8b1870518b54e8aa537c2d33dfcee877678
Author: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date: Wed Jan 29 12:13:03 2014 +0100
Fix transition to MODSEQ-enabled IMAP server.
Bug #12941.../lib/Horde/ActiveSync/Imap/Adapter.php | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
http://git.horde.org/horde-git/-/commit/5d55e8b1870518b54e8aa537c2d33dfcee877678
Assigned to Michael Rubinsky
State ⇒ Assigned
I considered something like this but didn't think it unreasonable to
require state reset when doing something as drastic as changing out
the imap server. Since it's such a simple patch though, no reason to
not include it.
Thanks.
New Attachment: activesync_modseq_transition_fix.txt
New Attachment: 0001-Fix-transition-to-MODSEQ-enabled-IMAP-server.-Bug-12.patch
Patch ⇒ Yes
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ AS: Transition to MODSEQ enabled IMAP server
Queue ⇒ Synchronization
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
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?