Ticket #538 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Requesting slow sync from sink does not set slow sync in opposite sink

Reported by: paule Owned by: dgollub
Priority: highest Milestone: OpenSync 0.40
Component: OpenSync Version: 0.32
Severity: blocker Keywords:
Cc:

Description

If in my plugin's connect() function I call osync_objtype_sink_set_slowsync(sink, TRUE), I would expect that the sink in the opposite plugin would be notified and by the time it called osync_objtype_sink_get_slowsync() on itself in get_changes() it would return TRUE so that it would know to report all items, however this does not occur (at least in my testing with file-sync and opie-sync).

I am doing this in the case where the file on the device is not present, ie. the device has probably been erased and therefore slow syncing should be done.

Change History

comment:1 Changed 4 years ago by paule

Would it be possible for someone to look into this? Thanks.

comment:2 in reply to: ↑ description Changed 4 years ago by dgollub

  • Owner changed from abauer to dgollub
  • Priority changed from normal to highest
  • Status changed from new to assigned
  • Severity changed from major to blocker

100 points.

That's not intended and i still can reproduce it .. we defenitily need a unit test for this in our test framework.

Way to reproduce without opie-sync:

msynctool --addgroup lazyslowsync
msynctool --addmember lazyslowsync file-sync
msynctool --addmember lazyslowsync file-sync
msynctool --configure lazyslowsync 1
msynctool --configure lazyslowsync 2
msynctool --discover lazyslowsync 1
msynctool --discover lazyslowsync 2
dani@marvin:~/projects/opensync> msynctool --showgroup lazyslowsync
Group: lazyslowsync
Member 1: file-sync
        Configuration : <?xml version="1.0"?>
<config>
  <directory>
    <path>/home/dani/Sync/file/1/data/</path>
    <objtype>data</objtype>
  </directory>
</config>

Member 2: file-sync
        Configuration : <?xml version="1.0"?>
<config>
  <directory>
    <path>/home/dani/Sync/file/2/data/</path>
    <objtype>data</objtype>
  </directory>
</config>

echo "foo4" > /home/dani/Sync/file/1/data/4

msynctool --sync lazyslowsync

# file-sync trigger a slow-sync in connect() if the configured path changed.
# so we change it for one member:

ln -s /home/dani/Sync/file/2/data/ /home/dani/Sync/file2data
msynctool --configure lazyslowsync 2
dani@marvin:~/projects/opensync> msynctool --showgroup file2file
Group: file2file
Member 1: file-sync
        Configuration : <?xml version="1.0"?>
<config>
  <directory>
    <path>/home/dani/Sync/file/1/data/</path>
    <objtype>data</objtype>
  </directory>
</config>

Member 2: file-sync
        Configuration : <?xml version="1.0"?>
<config>
  <directory>
    <path>/home/dani/Sync/file2data/</path>
    <objtype>data</objtype>
  </directory>
</config>

# intended action would be slow-sync for _all_ sinks in this group....
msynctool --sync lazyslowsync
# ... but no slow-sync got triggered on member #1!!!!! potential data-loss!


Thanks for the hint!

comment:3 Changed 4 years ago by dgollub

  • Status changed from assigned to closed
  • Resolution set to fixed

Paul, could you please give commit #2531 a try.

comment:4 Changed 4 years ago by dgollub

I mean r2531 not #2531

comment:5 Changed 4 years ago by paule

Yep, that seems to work. Thanks!

Note: See TracTickets for help on using tickets.