Hello Andris,

I haven't fully understood your scenario yet. I see that your server has 4 
items which apparently, at some time, have existed on the client (otherwise, 
there would be no RemoteID known at the server's end). In the sync you are 
running however, these items for some reason don't exist any more in the 
client, so the result is a 404.

Could you perhaps send a complete set of logs, starting with the initial slow 
sync and then the subsequent to-client-only sync that causes the problems?

>From the log snippets below I'd assume the real problem happened in the 
>session before that one, and the 404 are just consequential errors.

Best Regards,

Lukas

PS: Don't make your DB plugin insert a new item when no item for update is 
found. libsynthesis contains code to do that when appropriate - if the plugin 
did that by itself that could severly mess up things. libsynthesis relies on 
plugins to return 404 when an item addressed does not exist in the DB.


On Jul 29, 2011, at 13:39 , Andris Pavenis wrote:

> I have some problems with server to client only synchronization. I used our 
> own libsynthesis based server and 2 different
> clients for testing (Nokia E65 mobile phone and own libsynthesis based test 
> client).
> 
> Currently contacts data-store is marked read/only in server side 
> configuration. On client side data-store is emptyed. 
> 
> Below are fragments of both server and client side logs.
> 
> Removing DS admin data before sync causes slow sync and
> in that case this problem does not appear. Tried also to remove
> DS admin data directly after reading them from LoadAdminData, but it does not 
> help.
> 
> I could of course insert a new item when requested item is not found in
> UpdateItem and return its ID through newID, but it would fix problem only
> for my test client. Server must be able to work also with client available
> for example in mobile phones.
> 
> What could be wrong?
> 
> Andris
> 
>   Server side:
> 
> – [2011-07-29 12:37:59.766] 'SyncSet' - Items involved in Sync, 
> datastore=contacts [--][++] [->end] [->enclosing]
>       • [2011-07-29 12:37:59.766] SyncOp=wants-replace : LocalID= 1 RemoteID= 
> 1
>       • [2011-07-29 12:37:59.766] SyncOp=wants-replace : LocalID= 2 RemoteID= 
> 2
>       • [2011-07-29 12:37:59.766] SyncOp=wants-replace : LocalID= 3 RemoteID= 
> 3
>       • [2011-07-29 12:37:59.766] SyncOp=wants-replace : LocalID= 4 RemoteID= 
> 4
> ....
> 
> 
> – [2011-07-29 12:37:59.767] 'issue' - issuing command, Cmd=Sync [--][++] 
> [->end] [->enclosing]
>       • – [2011-07-29 12:37:59.767] 'sync' - Opened Sync command bracket, 
> Reopen=no, SourceURI=contacts, TargetURI=./contacts, IncomingMsgID=2, CmdID=3 
> [--][++] [->end] [->enclosing]
>               • [2011-07-29 12:37:59.768] Opened <Sync> bracket, 
> Source='contacts', Target='./contacts' as (outgoing MsgID=2, CmdID=3)
>               • – [2011-07-29 12:37:59.768] 'SyncGen' - Now generating sync 
> commands, datastore=contacts [--][++] [->end] [->enclosing]
>                       • [2011-07-29 12:37:59.768] Created command '[unknown]' 
> (outgoing)
>                       • – [2011-07-29 12:37:59.768] 'Item_Generate' - 
> generating SyncML item, SyncOp=wants-replace, RemoteID=1 [--][++] [->end] 
> [->enclosing]
>                               • [2011-07-29 12:37:59.768] Generating....
>                               • [2011-07-29 12:37:59.768] Item LocalID='', 
> RemoteID='1', operation=wants-replace
>                               • [2011-07-29 12:37:59.768] *** field data not 
> shown because userdata log is disabled ***
> –[2011-07-29 12:37:59.768] End of 'Item_Generate' [->top] [->enclosing]
> 
>   Client side (item is not found in data-store and as result code 404 is 
> generated).
> 
>       • – [2011-07-29 12:38:03.692] 'processCmd' - Processing incoming 
> command, Cmd=Replace, IncomingMsgID=2, CmdID=70 [--][++] [->end] 
> [->enclosing]           
>               • command started processing
>               • Created command 'Status' (outgoing)
>               • Item (syncop: replace) started processing, remoteID='', 
> localID='67'
>               • Remote sent replace-operation:
>               • - Source: remoteID ='', remoteName=''
>               • - Target: localID ='67', remoteName=''
>               • Explicit type 'text/vcard' specified in command or item meta
>               • Version '3.0' obtained from item data
>               • – [2011-07-29 12:38:03.692] 'Item_Parse' - parsing SyncML 
> item, SyncOp=replace, format=plain-text, LocalID=67 [--][++] [->end] 
> [->enclosing]
> –[2011-07-29 12:38:03.693] End of 'Item_Parse' [->top] [->enclosing]
>               • – [2011-07-29 12:38:03.693] 'Process_Item' - processing 
> remote item, SyncOp=replace, LocalID=67 [--][++] [->end] [->enclosing]
>                       • replace item operation received
>                       • startDataWrite called, status=0
>                       • TStdLogicDS::logicProcessRemoteItem starting, 
> SyncOp=replace, RemoteID='', LocalID='67'
>                       • cannot update record in database (sta=404)
>                       • Database Error --> SyncML status 404
>                       • to-be-replaced item not found, but cannot switch to 
> add because no RemoteID is known, Status=404
>                       • - Operation replace failed with SyncML status=404
> –[2011-07-29 12:38:03.693] End of 'Process_Item' [->top] [->enclosing]
>               • processSyncOpItem: Error while processing item, status=404
>               • Irregularity in execution of item, status=404
>               • – [2011-07-29 12:38:03.694] 'issue' - issuing command, 
> Cmd=Status [--][++] [->end] [->enclosing]
>                       • WARNING: Non-OK Status 404 returned to remote!
>                       • Status Code 404 issued for Cmd=Replace, (incoming 
> MsgID=2, CmdID=70)
>                       • - TargetRef (localID) = '67'
>                       • Status: issued as (outgoing MsgID=3, CmdID=69), not 
> waiting for status
>                       • Deleted command 'Status' (outgoing MsgID=3, CmdID=69)
>                       • Outgoing Message size is now 9561 bytes
> –[2011-07-29 12:38:03.694] End of 'issue' [->top] [->enclosing]
>               • Deleted command 'Replace' (incoming MsgID=2, CmdID=70)
> –[2011-07-29 12:38:03.694] End of 'processCmd' [->top] [->enclosing]
> As the result items are rejected on client side. I'n getting similar behavior 
> (but of course no detailed log) when trying the same on mobile phone (Nokia 
> E65)
> 
> Andris
> 
> 
> _______________________________________________
> os-libsynthesis mailing list
> os-libsynthesis@synthesis.ch
> http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis


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

Reply via email to