Ticket #506 (assigned defect)

Opened 1 year ago

Last modified 3 weeks ago

kdepim-sync plugin: conflicts, duplicate events

Reported by: bergolth Assigned to: cstender (accepted)
Priority: normal Milestone: 0.39
Component: Plugin: vformat Version: 0.22
Severity: normal Keywords:
Cc: tuju@iki.fi

Description

When synchronizing a small KDE-calendar with only one test-event with only a date and no time specified, opensync always reports a conflict when syncing with the file-sync plugin using --slow-sync.

On the second sync run, the two sides differ in <DateCalendarCreated?>. Additionally <DateStarted?> and <DateEnd?> contain only the date on KDE-side (<Content>20070616</Content>) and the date and time on the filesync-side (<Content>20070615T000000</Content> for <DateStarted?> and <Content>20070615T235900</Content> for <DateEnd?>).

If I select "Duplicate", it adds a new entry on both sides, of course. On the third sync, it reports a conflict between the duped events. Those events differ in <DateCalendarCreated?> but the <DateStarted?> and <DateEnd?> times now contain a trailing Z on one side (e.g. 20070615T000000 vs 20070615T000000Z).

Trace-files and sync-output:

Initial sync Second (slow) sync Third (slow) sync

file-sync output

KDE calendar-file

Opensync-config

Change History

06/16/07 16:39:15 changed by cstender

  • owner changed from ehabkost to cstender.
  • status changed from new to assigned.

09/12/07 16:13:28 changed by cstender

  • component changed from Plugin: kdepim to Plugin: vformat.
  • milestone set to OpenSync 0.40.

10/27/07 12:55:29 changed by tuju

I get this same with 0.33 and r2599.

{{ contact sink of member 2 of type syncml-obex-client just sent all changes Conflict for Mapping 0x2aaab433e6b0: Entry 1: Member: 2 (syncml-obex-client) UID: 1935 <?xml version="1.0"?> <contact>

<EMail Type="Internet">

<Content>Heli.Virtanen@company.com</Content>

</EMail> <FormattedName?>

<Content>Heli Virtanen</Content>

</FormattedName> <Name>

<LastName?>Virtanen</LastName> <FirstName?>Heli</FirstName>

</Name> <Revision>

<Content>20071025T103018Z</Content>

</Revision>

</contact>

Entry 2: Member: 1 (kdepim-sync) UID: yqjJ5p6TWP <?xml version="1.0"?> <contact>

<EMail>

<Content>Heli.Virtanen@company.com</Content>

</EMail> <FormattedName?>

<Content>Heli Virtanen</Content>

</FormattedName> <Name>

<LastName?>Virtanen</LastName> <FirstName?>Heli</FirstName>

</Name> <Revision>

<Content>20071025T132601Z</Content>

</Revision> <Uid>

<Content>yqjJ5p6TWP</Content>

</Uid>

</contact> }}

Is this known issue with new 0.3x versions or something 0.2x specific? Should I open a new issue for 0.3x version? Is this something that could be fixed with capabilities.xml? I tried but failed.

10/27/07 13:04:51 changed by tuju

  • cc set to tuju@iki.fi.

10/27/07 16:41:45 changed by dgollub

Tuju could you try latest SVN revision - at least r2602:

------------------------------------------------------------------------
r2602 | dgollub | 2007-10-25 13:45:29 +0200 (Thu, 25 Oct 2007) | 12 lines

Changed _osync_xmlformat_subtract_points() behavoir to not influnce the collected_points. It has to
return 0 for ignored fields to not influence the collected_points. (Return value is mostly used to 
add/subtract collected_points).

Another issue - less likely:

0 Points got returned for ignored fields to avoid influence of the collected_points value and let
collected_points not raise over the threshold value. This could change the compare result to SIMILAR,
even if the entry should  MISMATCH, this should be avoided. This happens when the number of ignored fiels
is the greather equal as the thresold value.


------------------------------------------------------------------------
r2601 | dgollub | 2007-10-25 13:19:36 +0200 (Thu, 25 Oct 2007) | 3 lines

Score table has to be sorted!
Do sanity check for left-right / right-left comparing issues.

------------------------------------------------------------------------
r2600 | dgollub | 2007-10-25 13:11:29 +0200 (Thu, 25 Oct 2007) | 9 lines

Added _osync_xmlformat_subtract_points() to fix the issue with ignored
fields in xmlfield2 aka. 2nd entry. This uses _osync_xmlformat_get_points() 
but handle the case if the needs to be ignored. Ignored fields doesn't have 
influence on the compare result. This needed to keep the compare result SAME 
if an ignored fields are the only differences between the entries.

This fixes the xmlformat ignored field testcase.

This should at least fix your conflict with <Uid> since it doesn't got correctly ignored if the fields which should be ignored in the 2nd entry/right side. Not quite sure about the Type="Internet" attribute of the EMail field. Actually this should conflict as well.

Thanks for testing.

10/27/07 17:42:09 changed by cstender

Tuju, please test it again with current svn and open another ticket if you can still reproduce this error.

10/28/07 02:54:24 changed by tuju

I still have the same with r2646. Should capabilities.xml work? In member dir or under /usr/share/ ?

02/26/08 14:48:14 changed by cstender

  • priority changed from high to normal.

07/30/08 18:20:03 changed by tuju

  • milestone changed from 0.40 to 0.38.

08/21/08 16:24:19 changed by tuju

  • milestone changed from 0.38 to 0.39.

vformat will get more attention in 0.39.