View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Jesse Vincent > App-SD-0.73 > App::SD::ForeignReplica



Annotate this POD


New  13
Open  13
View/Report Bugs
Source   Latest Release: App-SD-0.75

integrate_change $change $changeset

Given a change (and the changeset it's part of), this routine will load the push encoder for the foreign replica's type and call integrate_change on it.

To avoid publishing prophet-private data, It skips any change with a record type that record_type starts with '__'.

This is probably a bug.


Walk the set of transactions on the ticket whose id you've passed in, looking for updates by the 'current user' which happened after start_time and before now. Then mark those transactions as ones that originated in SD, so we don't accidentally push them later.


record_pushed_transaction $foreign_transaction_id, $changeset

Record that this replica was the original source of $foreign_transaction_id (with changeset $changeset)

foreign_transaction_originated_locally $transaction_id $foreign_record_id

Given a transaction id, will return true if this transaction originated in Prophet and was pushed to the foreign replica or originated in the foreign replica and has already been pulled to the Prophet replica.

This is a mapping of all the transactions we have pushed to the remote replica we'll only ever care about remote sequence #s greater than the last transaction # we've pulled from the remote replica once we've done a pull from the remote replica, we can safely expire all records of this type for the remote replica (they'll be obsolete)

We use this cache to avoid integrating changesets we've pushed to the remote replica when doing a subsequent pull

uuid_for_remote_id $id

lookup the uuid for the remote record id. If we don't find it, construct it out of the remote url and the remote uri path for the record id;


When pushing a record created within the prophet cloud to a foreign replica, we need to do bookkeeping to record the prophet uuid to remote id mapping.

syntax highlighting: