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 |
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
#12770Consider 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
New Attachment: 0001-Fix-sync-loop-of-Kolab-categories-Horde-tags-sync.-S.patch
State ⇒ Assigned
bugfix for this issue I forgot to upstream.
Please see the attached patch. It's tested against current git HEAD.
Assigned to Michael Rubinsky
State ⇒ Resolved
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
New Attachment: 0001-Fix-sync-loop-of-Kolab-categories-Horde-tags-sync.-F.patch
Please remove the other patch, I don't have permission to delete it :(
Patch ⇒ Yes
New Attachment: 0001-Fix-fatal-crash-on-sending-back-incoming-sync-confli.patch
Patch ⇒ No
State ⇒ Unconfirmed
Milestone ⇒
Queue ⇒ Kronolith
Summary ⇒ Sync "loop" of Kolab categories <-> Horde tags sync
Type ⇒ Bug
Priority ⇒ 1. Low
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