Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0
Table of Contents
outlinetrue
indent20px
stylenone
printablefalse

The Sync Module adds a Custom Hibernate Interceptor to know whenever something is going into the database. This requires that all changes to the database go through the API. If the changes do not go through the API, then the changes will not get logged and so will not get sent to the parent/child servers.

...

On servers with children:

...

  • As soon as a sync_record is written, a sync_server_record row is created for each child server. As changes are sent down to children, the sync_server_record rows are set to a status of COMMITTED.
    On servers without a parent:

...

  • The sync_record rows will always have a status of NEW.
    On servers with a parent:

...

  • The sync_record rows will change to COMMITTED after the record has been sent up to the parent

There is a scheduled task that cleans out old sync records. This task is enabled by default and set to delete at least 4 week old records every week. The logic behind this task is:

  • if server has a parent (meaning this server is a leaf node or in the middle of the tree): delete all sync_record rows that are COMMITTED or NOT_SUPPOSED_TO_SYNC
  • if server is root node (no parent, only children): delete sync_server_record rows that are safe to delete (aka, old and marked as COMMITTED or NOT_SUPPOSED_TO_SYNC), then delete rows irrespective of status in sync_record that have zero rows in sync_server_record

sync_record.original_uuid is the uuid of the first sync_record that caused this. If a record was created on itself, the uuid and original_uuid columsn will be equal. If the record was received from a child, the sync_record.original_uuid on the parent will be equal to the sync_record.uuid from the child. The sync_record.uuid will be different.

Sync_import table

This holds the data coming in from a parent or up from a child that has to be committed. Only holds uuids so that we know what we have received already and don't recommit something. When first put into the table the status is PENDING. Once it has been committed to the database the status is COMMITTED. If the server is a child server, once the status will change to COMMITTED_AND_CONFIRMATION_SENT once an ack has been sent back to the parent server. If a server resends a sync record, the uuid in the sync record will match up with the uuid in the sync_import table. That row in the sync_import table will then get a status of ALREADY_COMMITTED and the sync_record will not be written to the database.

...

The Sync Module by default comes with several classes already excluded that clearly represent actions only intended for local server and therefore are not subject to sync: global properties, scheduler configuration, etc. While the sync user interface allows administrators to add/remove to this list of classes to customize their specific implementation, it is strongly recommended the defaults that come pre-installed are left as is.

Resources

...

Panel

*Sync Module Technical Overview (this page)

...

(Back to Sync Module home page)