10,730
edits
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"> | ||
<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> | ||
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. | ||
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 full synchronization: Can you improve SyncFilter? | |||
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. |