none
SyncFolderItems and ReadFlagChanges on Exchange 2010 RRS feed

  • Question

  • We use the SyncFolderItems call to synchronize our softwares local database with the Exchange.

    After the initial synchronization we have a problem with the call as we get thousands of ReadFlagChanges.
    If we select 1000 mails, 4 of them unread, mark them all as read, mark them as unread and mark them as read again we do not get the changes from the last sync state (the 4 mails that were unread) but we receive 3000 ReadFlagChange events, three for each item.

    Is this a misconfiguration on the server? Or a new "feature? On the Exchange 2007 SP1 test server this does not happen.
    Any idea how we could avoid this? We call syncFolderItems with 100 items, and retrieving thousands of useless ReadFlagChanges makes the process really slow.

    Wednesday, February 19, 2014 8:55 AM

All replies

  • I just found this old thread, and it indicates that what you're seeing is expected - http://social.technet.microsoft.com/Forums/exchange/en-US/368baba8-2b2a-4f24-a037-c9dbb05f11d9/exchangeservicesyncfolderitems-oddity-or-misunderstanding?forum=exchangesvrdevelopmentPer David Claux "Note that we  do not perform any kind of optimization for ReadFlagChange events, so although  all you really need is the last one, you will get all the ReadFlagChange events  that occurred since the last sync."
    Monday, February 24, 2014 4:20 PM
    Moderator
  • Thank you for the link. We have done some further research into the issue and I have opened a support issue today, so i hope we'll get it clarified soon. For the test i placed two items into a folder. When i call syncFolderItems with MaxChangesReturned set to 2 i get 2 creates. When i set MaxChangesReturned to 1 i have to make 2+x calls, i get the 2 creates with the first 2 calls, followed by a number of ReadFlagChanges. I don't think that the Exchange is supposed to deliver ReadFlagChanges on the initial synchronization.
    David Claux "Note that we  do not perform any kind of optimization for ReadFlagChange events, so although  all you really need is the last one, you will get all the ReadFlagChange events  that occurred since the last sync."

    The important thing is "since last sync", as we get all ReadFlagChange events on the initial sync.
    And we only get them if MaxChangesReturned is lower than the number of items in the folder.

    Monday, February 24, 2014 4:54 PM
  • I run into the same issue with Exchange2007_SP1, inbox with 20k+ mails, initial sync returns the messages. Then there is another 20k read flag changed. It takes forever to go over it.

    Have you been able to resolve that issue? and if so - how? 

    thanks

    Tomasz


    Thursday, September 24, 2015 12:41 AM
  • No, i have never found any solution for it - other than to upgrade the Exchange server in question or wait until the read flag changes exhaust themselves at some point.
    Tuesday, October 6, 2015 12:51 PM