Patrick Ohly | 24 Sep 17:33 2014
Picon

aborting a sync -> slow sync

Hello Lukas!

Let me pick your brain for a second... :-)

When SyncEvolution runs a local sync (i.e. both client and server are
provided by SyncEvolution) and the sync gets aborted (= STEPCMD_ABORT is
passed to SessionStep()), I noticed that the next sync starts again as
if nothing happened.

For example, aborting a normal two-way sync and then syncing again does
another normal sync using the same sync anchors because the datastores's
SaveAdminData has never been called during the aborted sync.

The result is that the server can end up adding the same items twice,
once during the aborted sync and again during the next one. This causes
duplicates, because the client side has no means of detecting the
duplicate.

How is this case supposed to be handled? Is SyncEvolution doing
something wrong in its change or meta data handling?

My current workaround consists of detecting when the server side sends
data to the client and resetting the admin data. If the sync does not
complete, the next sync will be a slow sync because the server's sync
anchor is gone. Is there a better way?

--

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
(Continue reading)

Patrick Ohly | 29 Aug 10:46 2014
Picon

avoiding disk writes during sync without changes

Hello!

For IVI, I am working on cloud syncing. When syncing against a WebDAV
server, SyncEvolution runs a two-way sync with binfile client on the
WebDAV side and a server with admin data handled by SyncEvolution on the
other side.

One goal for IVI is to minimize or better, avoid disk writes, because
flash storage must last as long as possible.

The most common case is that nothing changed on either side. In this
case, libsynthesis unnecessarily updates nonce (even if not used; I've
already patched that (1)), sync anchors (again, I have a patch for this:
skip writing of admin data after detecting the special case (2)) and the
change log in the binfile client.

This last write happens in TBinfileImplDS::changeLogPreflight(). The
changes are minor, just a few bytes change. I suspect that these are the
time stamps and modcount embedded in the log.

Would it be possible to check in changeLogPreflight() how significant
the changes are? If there were no item changes, what would be the effect
of not updating the header?

There are two cases where that can happen with the attached patch:
- the processes crashes
- SyncEvolution skips the session shutdown, see (2).

(1) For local sync, <requestedauth>none</requestedauth> and
<requiredauth>none</requiredauth> are used. Patch attached. Okay?
(Continue reading)

Patrick Ohly | 11 Jul 15:27 2014
Picon

comparison of PHOTO data

Hello!

I'm currently investigating why a comparison of two PHOTO fields of
different length returns "field equal". PHOTO is defined as:

      <field name="PHOTO" type="string" compare="conflict" merge="fillempty"/>

I think the specific situation is that the two values contain a null
byte somewhere in the middle, and the part before that is equal.

I think the following code does the comparison, doesn't it?

sInt16 TStringField::compareWith(TItemField &aItemField, bool aCaseInsensitive)
{
  sInt16 result;
  PULLFROMPROXY;
  if (aItemField.isBasedOn(fty_string)) {
    TStringField *sfP = static_cast<TStringField *>(&aItemField);
    #ifdef STREAMFIELD_SUPPORT
    sfP->pullFromProxy(); // make sure we have all chars
    #endif
    // direct compare possible, return strcmp
    if (aCaseInsensitive)
      result=strucmp(fString.c_str(),sfP->fString.c_str());
    else
      result=strcmp(fString.c_str(),sfP->fString.c_str());
  }
...

We have std::string as value and therefore can store null bytes as part
(Continue reading)

anuj chauhan | 19 May 15:16 2014
Picon

How to run syncevolution at bare minimum processing.

Hi ,


I am trying to run 300 concurrent sync-sessions from my machine with a server.
I have a quad-core machine with 8gb ram and these processes are consuming about 90-94% of the cpu usage.I want to tune syncevolution so that it could run on bare minimum processing.For this i have done following modification :

1.      Commented out the code which gets the Server DevInf. I suspect, this will reduce load on Server and client as well.

2.       Removed the file synccompare. During these concurrent runs, top command showed high CPU usage for Perl just after syncevolution completed its exercise. By removing this file, this reduced the client load and processing.

3.       Reduced the log level to 0. Number of IO went down along with the disk usage.

 

For server load testing i am not concerned with data loss and want minimal logging.

Can you suggest some more pieces of code/functionality which can be disabled so that the overall CPU usage goes down?



Regards
Anuj Chauhan

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Patrick Ohly | 14 May 21:15 2014
Picon

Re: mixing properties with and without group tag (was: Re: suppressempty + arrays)

On Wed, 2014-05-14 at 17:44 +0200, Lukas Zeller wrote:
> Hello Patrick,
> 
> On 12.05.2014, at 18:25, Patrick Ohly <patrick.ohly@...> wrote:
> 
> > [...] 
> >> and a property which has a group tag must not reuse any of these
> >> unassigned group tag values.
> > 
> > Actually, a "property which has a group *field*" - it doesn't matter
> > whether the current property has a group tag value. This check was
> > missing. Attached a patch adding it, in a brute-force manner. Does that
> > look right?
> 
> Yes, it looks right to me. I guess you've found out in the meantime if it also *works* right :-)

Yes, it works for me. But it's good that you had a look at it anyway,
because my vCard profile certainly isn't representative.

I'll include this and the other patches (including the removal of
backslash escaping in parameters!) in the master branch of libsynthesis
on freedesktop.org once it passed all my tests. There's also a memory
leak fix for SWAP().

--

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
Patrick Ohly | 12 May 12:55 2014
Picon

suppressempty + arrays

Hello!

What's the intended behavior of suppressempty for arrays?

        "suppressempty": This optional boolean value. can be set to true if this property must
        never be sent empty (without values). This is the case for most vCalendar fields, for example.

The default seems to be suppressempty=no (judging from the "can be set
to true"). When I have arrays with empty entries, will those be
generated?

Example:

- 35 :     string RELATEDNAMES    [   0,   0,     0] : <array with 3
elements>
                                     -- element    0 : <empty>
                                     -- element    1 : <empty>
                                     -- element    2 : <empty>
...
- 83 :     string LABEL           [   0,   0,     0] : <array with 3 elements>
                                     -- element    0 : "Spouse"
                                     -- element    1 : "Manager"
                                     -- element    2 : "Assistant"

        <property name="X-ABRELATEDNAMES" groupfield="GROUP_TAG">
          <value field="RELATEDNAMES"/>
          <position field="RELATEDNAMES" repeat="array" increment="1" minshow="0"/>
          <parameter name="X-ABLabel" rule="HAVE-ABLABEL-PARAMETER" sharedfield="yes">
            <value field="LABEL"/>
          </parameter>
        </property>
...
        <property name="X-ABLabel" suppressempty="yes" groupfield="GROUP_TAG" rule="HAVE-ABLABEL-PROPERTY">
          <value field="LABEL" repeat="array" increment="1" minshow="0"/>
          <position field="LABEL" repeat="array" increment="1" minshow="1"/>
        </property>

This leads to:

BEGIN:VCARD
VERSION:3.0
PRODID:-//Synthesis AG//NONSGML SyncML Engine V3.4.0.47//EN
REV:20140512T093706Z
UID:syuid384197.212266690650521
N:parserbug=;;;;
FN:parserbug=
X-EVOLUTION-FILE-AS:parserbug=
NICKNAME:user17
NOTE:triggers parser bug in Funambol 3.0: trailing = is mistaken for soft l
 ine break=
item3.X-ABLabel:Spouse
item2.X-ABLabel:Manager
item1.X-ABLabel:Assistant
END:VCARD

The X-ABRELATEDNAMES properties were not generated. The labels should be
redundant, but some peers get confused. Google preserves them as
stand-alone X-ABLabel without tag. DAViCal preserves them with tag,
which then happened to confuse SyncEvolution's conversion code (separate
issue).

--

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
Patrick Ohly | 7 May 20:20 2014
Picon

[+ x] for next field

Hello!

The documentation mentions:

        In addition there is a special form of array index that can be
        used to access fields in a field list
        (see 10.1) by index instead of by name. This special form of
        array index starts with a + sign as the
        first character after the opening [ as shown in the following
        example:
        <!-- a sample field list -->
        <fieldlist>
        <field name="NAME" type="string"/>
        <field name="TEL_1" type="telephone"/>
        <field name="TEL_2" type="telephone"/>
        <field name="TEL_3" type="telephone"/>
        </fieldlist>

        /* sample script to access the telephone numbers by index
        instead of by name */
        integer i;
        telephone a,b,c;
        a = TEL_1[+0]; // this is the same as: a=TEL_1
        b = TEL_1[+1]; // this is the same as: b=TEL_2
        c = TEL_1[+2]; // this is the same as: c=TEL_3

Does this also work for fields which are arrays? Like this:

      <field name="TEL"         array="yes" type="telephone" compare="conflict"/>
      <field name="TEL_FLAGS"   array="yes" type="integer"   compare="conflict"/> <!-- offset 0 -->
      <field name="TEL_LABEL"   array="yes" type="string"    compare="conflict"/> <!-- offset 1 -->
      <field name="TEL_ID"      array="yes" type="integer"   compare="conflict"/> <!-- offset 2 -->
      <field name="TEL_SLOT"    array="yes" type="integer"   compare="never"/>    <!-- offset 3 -->

      a = TEL[+1][3]; // same as TEL_FLAGS[3]

I tried it briefly, but got a syntax error which implied that the first
square brackets were treated like a normal array index in TEL.

What would it take to make this work?

--

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
anuj chauhan | 7 May 13:07 2014
Picon

Syncevoltion throwing error on log level < 4

Hi ,


I am facing a issue on reducing log level<4.Syncevolution is

throwing following error:


#[ERROR] basic_string::_S_construct null not valid


 Please suggest how to resolve this problem.




Thanks & Regards

Anuj Chauhan



_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Rajesh Kumar Pawar | 28 Apr 14:53 2014
Picon

Duplication of data during a merge scenario

Hi,

 

I've been trying to work on a merging  scenario using syncevolution as a client.

 

The steps that I followed in this scenario are as follows

1.       Created a contact with TEL;CELL:12456399

2.       Perform slow sync with server

3.       Modify the field in client vCard as TEL;CELL:12456300

4.       Wait for 5min to ensure sufficient difference between the modification time stamps.

5.       Modified the field as TEL;CELL:12456391 on server.

6.       Perform a two-way sync.

 

vCard before sync:

BEGIN:VCARD

REV:20140425T113334Z

N:last;first;middle;prefix;suffix

TEL;CELL:12456399

VERSION:2.1

UID:1000101

X-CT:PERSON

END:VCARD

 

vCard after sync

BEGIN:VCARD

REV:20140425T165221Z

N:last;first;middle;prefix;suffix

TEL;CELL:12456391

TEL;CELL:12456300

VERSION:2.1

UID:1000101

X-CT:PERSON

END:VCARD

 

What was expected is that the server wins the conflict as the data was modified last at server and result be as follows

 

BEGIN:VCARD

REV:20140425T165221Z

N:last;first;middle;prefix;suffix

TEL;CELL:12456391

VERSION:2.1

UID:1000101

X-CT:PERSON

END:VCARD

 

Instead the data was duplicated in the vCard

 

While for server the data remains as modified i.e. TEL;CELL:12456391

 

 

Fieldlist entries:

      <field name="TEL" array="yes" compare="conflict" type="telephone"/>

      <field name="TEL_FLAGS" array="yes" compare="conflict" type="integer"/>

 

While going through the code in file SyncSource.cpp found the following lines.

 

        "      <!-- conflict strategy: Newer item wins\n"

        "           You can set 'server-wins' or 'client-wins' as well\n"

        "           if you want to give one side precedence\n"

        "      -->\n"

        "      <conflictstrategy>newer-wins</conflictstrategy>\n"

        "\n"

    

This shows that syncevolution should have discarded the local entry and replaced it with the entry from server.

Kindly suggest a way to correct or control this merging.

 

Thank You,

Rajesh

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis
Anuj | 25 Apr 11:12 2014
Picon

How to stop asking for server DevInf

Hi lukas,
While doing sync with server I observed that server is sending a dev inf  and my evolution client is changing
the behaviour according to servers dev inf  for further sync sessions.How do I make   my client stop asking
for servers dev inf?

Regards
Anuj Chauhan
Sachin Gupta | 25 Apr 11:33 2014
Picon

SyncML Server Performance using Syncevolution

Hi Lukas/Patrick,

I have to run some test cases using syncevolution as client to test a SyncML server performance. Expectation is to put load of around 2500 users syncing concurrently for an hour.

Can you suggest how i can test SyncML Server performance and have 2500 users/syncevolutions connecting simultaneously?

Regards
Sachin 
_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@...
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Gmane