Sync Module FAQ

What happens if a payload is uploaded/sent twice?

The sync_import table holds the uuid for each data package received. This is the first table checked when something is uploaded, so if a file (during File Transfer Mode) is sent twice, it will be silently skipped over and not processed. Note that acknowledgement IS still generated for these changes to account for a possible loss of the acknowledgement (ack) during the first processing of the changes. As a result, if file transfer is used, the response file containing this ack is still generated.

What if a data is received twice before data has a chance to be sent back? (during File Transfer Mode)

The sync module makes use of ACK@ws between a parent and child server to know if/when a file is received. A server will continue to resend data until an ACK comes back from the receiving server. So in this case, the second set of data will contain all the first data AND all new data. The receiving server will skip over the duplicates and process the new ones. The ACK for the second received file will contain acknowledgements for both the skipped and processed files (which hopefully the sending server gets eventually)

What if payloads are delivered out of order? (during File Transfer Mode)

Payloads should come in in order. The sync module makes no attempt to order the processing, but it is impossible to get them out of order due to the ACKing. An ACK is only generated after data is received and processed successfully, and payloads continue to be sent until an ACK is received. In practice this means that even if the physical files are uploaded out of order, the changes they contain are always cumulative and in order. This adds some overhead of cumulatively retransmitting changes that eventually are already processed if transmissions do come in order. However, it also ensures that out of order file processing works without having to track individual files which in turn makes the whole solution simpler: a loss of single file does not affect the overall process.

Why am I getting "Cannot allocate memory" during sync child create?

The default method for creating a sync child is to fork the java process and use mysqldump to get a file. The forked process gets the same memory allotment that the original had. So make sure you are not giving tomcat greater than 50% of your available memory.

(Back to Sync Module home page)