6.0.0-beta1
8/9/25

[#12770] Sync "loop" of Kolab categories <-> Horde tags sync
Summary Sync "loop" of Kolab categories <-> Horde tags sync
Queue Kronolith
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 10/16/2013 (4315 days ago)
Due
Updated 06/02/2015 (3721 days ago)
Assigned 05/29/2015 (3725 days ago)
Resolved 06/02/2015 (3721 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch Yes

History
06/02/2015 12:13:52 AM Michael Rubinsky State ⇒ Resolved
 
06/02/2015 12:12:38 AM Git Commit Comment #7 Reply to this comment
Changes have been made in Git (master):

commit d45e47aedf28e59145cc75361004cce7765b1a9d
Author: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date:   Sat May 30 18:14:14 2015 +0200

     Fix sync "loop" of Kolab categories <-> Horde tags sync. Second 
part of #12770

     Consider this scenario with a new, empty task list:

     1. User inserts the first task. The task is tagged with "foobar".
        This tag is inserted into the tagging backend.
     2. User creates another task with a foreign Kolab client.
        This task is tagged "Foobar" (noticed the capital 'F')
     3. nag syncs in the foreign task. The Kolab sync tells
        the tagging backend to store the tag(s) for the new task object,
        it does a case insensitive search for an existing tag label.
        -> it picks the existing row id of "foobar".

     The next time Nag_Task::synchronizeTags() runs, it notices
     the tags given by the Kolab driver for the second task
     differ from the tag backend ("Foobar" != "foobar")
         -> A sync is triggered.

     Fix it by making the tag label comparison case insensitive.
     A similar fix is already in place in kronolith.

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

  nag/lib/Task.php |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

http://github.com/horde/horde/commit/d45e47aedf28e59145cc75361004cce7765b1a9d
05/29/2015 04:23:08 PM Thomas Jarosch Comment #6
New Attachment: 0001-Fix-sync-loop-of-Kolab-categories-Horde-tags-sync.-S.patch Download
State ⇒ Assigned
Reply to this comment
While walking through my pile of local patches, I found a second 
bugfix for this issue I forgot to upstream.

Please see the attached patch. It's tested against current git HEAD.

11/21/2013 09:27:02 PM Michael Rubinsky Comment #5
Assigned to Michael Rubinsky
State ⇒ Resolved
Reply to this comment
Committed.
11/21/2013 09:26:33 PM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 24181adf76bef93aaefba40ebf66d25ec1c7a05d
Author: Thomas Jarosch <thomas.jarosch@intra2net.com>
Date:   Wed Oct 16 16:22:31 2013 +0200

     Fix sync "loop" of Kolab categories <-> Horde tags sync. Fixes #12770.

     Consider this scenario with a new, empty calendar:

     1. User inserts the first event. The event is tagged with "foobar".
        This tag is inserted into the tagging backend.
     2. User creates another event with a foreign Kolab client.
        This event is tagged "Foobar" (noticed the capital 'F')
     3. kronolith syncs in the foreign event. The Kolab sync tells
        the tag backend to store the tag(s) for the new event object,
        it does a case insensitive search for an existing tag label.
        -> it picks the existing row id of "foobar".

     The next time Event::synchronizeTags() runs, it notices
     the tags given by the Kolab driver for the second event
     differ from the tag backend ("Foobar" != "foobar")
         -> A sync is triggered.

     I have a productive calendar with about 2.000 events.
     The sync "loop" produces 3.6000+ INSERT / UPDATE statements
     on every click.

     Fix it by making the tag label comparison case insensitive.

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

  kronolith/lib/Event.php |    6 ++++--
  1 files changed, 4 insertions(+), 2 deletions(-)

http://git.horde.org/horde-git/-/commit/24181adf76bef93aaefba40ebf66d25ec1c7a05d
10/16/2013 02:45:34 PM Michael Rubinsky Deleted Original Message
 
10/16/2013 02:41:40 PM Thomas Jarosch Comment #3
New Attachment: 0001-Fix-sync-loop-of-Kolab-categories-Horde-tags-sync.-F.patch Download
Reply to this comment
This is the real patch.

Please remove the other patch, I don't have permission to delete it :(

10/16/2013 02:40:22 PM Thomas Jarosch Comment #2
Patch ⇒ Yes
New Attachment: 0001-Fix-fatal-crash-on-sending-back-incoming-sync-confli.patch
Reply to this comment
The patch.

10/16/2013 02:38:44 PM Thomas Jarosch Comment #1
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Sync "loop" of Kolab categories <-> Horde tags sync
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Hi,

consider this scenario with a new, empty calendar:

1. User inserts the first event. The event is tagged with "foobar".
    This tag is inserted into the tagging backend.
2. User creates another event with a foreign Kolab client.
    This event is tagged "Foobar" (noticed the capital 'F')
3. kronolith syncs in the foreign event. The Kolab sync tells
    the tag backend to store the tag(s) for the new event object,
    it does a case insensitive search for an existing tag label.
    -> it picks the existing row id of "foobar".


The next time Event::synchronizeTags() runs, it notices
the tags given by the Kolab driver for the second event
differ from the tag backend ("Foobar" != "foobar")
     -> A sync is triggered.

I have a productive calendar with about 2.000 events.
The sync "loop" produces 3.6000+ INSERT / UPDATE statements
on every click. Yikes.

Please consider the attached patch, which makes the
tag comparison case insensitive.

If the patch gets approved, we need to fix
the tag sync of the other applications, too.

Another option would be to make the tagger backend
case sensitive, but that would lead to duplicate entries
because of lower / uppercase spelling. Not really an option.

Without the patch, browsing around in the calendar
takes about seven seconds for each click on a box with a SSD.
With the patch it's about one second.

Note: I removed the strcoll() based sorting, it is of no use,
array_diff() does not care about the order of elements.

Cheers,
Thomas

Saved Queries