Synchronization steps: Difference between revisions

Jump to navigation Jump to search
Line 342: Line 342:


== Cleanup ==
== Cleanup ==
Cleanup step is performed for each entity. We delete records that do not match SyncFilter.
Special cleanup actions:
* Delete old audit records that were uploaded to server.
* Delete activityparty records that do not belong to any activity
* Delete orphaned annotations.


<syntaxhighlight lang="xml">
<syntaxhighlight lang="xml">
foreach entity
{
Delete records that do not match SyncFilter
}
<Cleanup ... Sum:140ms, Deleted 2869+0nn />
<Cleanup ... Sum:140ms, Deleted 2869+0nn />
<Cleanup 265ms, Deleted 1+0nn />
<Cleanup 265ms, Deleted 1+0nn />
Line 366: Line 368:
Sum:13719ms, Deleted 80246+24987nn />
Sum:13719ms, Deleted 80246+24987nn />
</syntaxhighlight>
</syntaxhighlight>
Notes:
N
otes:
* Cleanup of a large database may take long.
* Cleanup of a large database may take long.
* We avoid partial cleanup actions if we know that they are not needed. (For example, the entity was not changed and the SyncFilter is not time-dependent.)
* We avoid partial cleanup actions if we know that they are not needed. (For example, the entity was not changed and the SyncFilter is not time-dependent.)
* There is no cleanup if the sync was interrupted.
* There is no cleanup if the sync was interrupted.


Problems to look for:
If there are too many deletes, try to find out why.
* If there are too many deletes, try to find out why.
* In case of incremental synchronization: Wouldn't be better to set ForcedFullSync for given entity?
** In case of incremental synchronization: Wouldn't be better to set ForcedFullSync for given entity?
* In case of full synchronization: Can you improve SyncFilter?
** In case of full synchronization: Can you improve SyncFilter?
* Orphaned annotations: Notes that do not belong to anybody. (Regardingid points to a record that was not downloaded to the client. Why?)


There is additional cleanup related to things we did not discuss yet, for example documents.
There is additional cleanup related to things we did not discuss yet, for example documents.

Navigation menu