6.0.0-alpha12
6/12/25

[#12606] AS: Fix sync loop if all messages in a folder were filtered on initial sync
Summary AS: Fix sync loop if all messages in a folder were filtered on initial sync
Queue Synchronization
Queue Version Git master
Type Bug
State Resolved
Priority 2. Medium
Owners mrubinsk (at) horde (dot) org
Requester thomas.jarosch (at) intra2net (dot) com
Created 08/23/2013 (4311 days ago)
Due
Updated 08/26/2013 (4308 days ago)
Assigned 08/23/2013 (4311 days ago)
Resolved 08/26/2013 (4308 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
08/26/2013 03:46:41 PM Michael Rubinsky State ⇒ Resolved
 
08/26/2013 03:46:13 PM Git Commit Comment #2 Reply to this comment
Changes have been made in Git (master):

commit 6b7193aefc3295d925919b7608ff7b2f7ff8f86c
Author: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date:   Fri Aug 23 17:33:37 2013 +0200

     Fix sync loop if all messages in a folder were filtered on initial sync

     We are only calling $folder->setChanges() if we found changes for 
a folder.
     If all messages are older than our filter window, we never called 
setChanges().
     Therefore the total message count was still zero.

     The next time we ping() the folder, the total message count
     does not match for the folder -> we have a positive "ping".
     This results in a sync loop.

     Since we simplified the CONDSTORE / non-CONDSTORE handling,
     there is no need to store "total_messages" in a separate variable.
     Just get it from the saved IMAP state which we update unconditionally.

     Bug: 12606 - Fix regression caused by addition of message count 
check in imap pinging.

     Signed-off-by: Michael J Rubinsky <mrubinsk@horde.org>

  .../lib/Horde/ActiveSync/Folder/Imap.php           |   21 ++++---------------
  .../lib/Horde/ActiveSync/Imap/Adapter.php          |    8 +++---
  2 files changed, 9 insertions(+), 20 deletions(-)

http://git.horde.org/horde-git/-/commit/6b7193aefc3295d925919b7608ff7b2f7ff8f86c
08/23/2013 03:43:18 PM Thomas Jarosch Assigned to Michael Rubinsky
State ⇒ Assigned
 
08/23/2013 03:43:06 PM Thomas Jarosch Comment #1
Priority ⇒ 2. Medium
New Attachment: 0001-Fix-sync-loop-if-all-messages-in-a-folder-were-filte.patch Download
Patch ⇒ Yes
Milestone ⇒
Queue ⇒ Synchronization
Summary ⇒ AS: Fix sync loop if all messages in a folder were filtered on initial sync
Type ⇒ Bug
State ⇒ Unconfirmed
Reply to this comment
From the patch:

[PATCH] Fix sync loop if all messages in a folder were filtered on
  initial sync

We are only calling $folder->setChanges() if we found changes for a folder.
If all messages are older than our filter window, we never called 
setChanges().
Therefore the total message count was still zero.

The next time we ping() the folder, the total message count
does not match for the folder -> we have a positive "ping".
This results in a sync loop.

Since we simplified the CONDSTORE / non-CONDSTORE handling,
there is no need to store "total_messages" in a separate variable.
Just get it from the saved IMAP state which we update unconditionally.

Saved Queries