Comment 1 for bug 1464022

Revision history for this message
Eran Rom (eranr) wrote :

Two Comments:

1. Missing from the optimization above: If we do maintain ‘last_metadata_sync_timestamp’ , then we should check against it all metadata items timestamps before issuing any POST to the remote container. Thus, the sync process proceed as follows:
  1. Get the 'last_metadata_sync_timestamp' from the info table
  2. Given the metadata json kept in the container info table proceed as follows:
    a. filter out all metadata items whose timestamp > last_metadata_sync_timestamp
    b. Group the remaining metadata items according to their timestamp (items are: <key,(timestamp, value)>), and sort the groups in increasing order of timestamps
    c. For each group issue a POST to the remote cluster carrying the group’s timestamp as the x-timestamp header (not to forget the metadata items in the group).
    d. After each successful post update the ‘last_metadata_sync_timestamp’ to reflect the sent POST

2. The above suggest to control the replicated metadata in the config file. Seems that this should be done as a container metadata, e.g.:
x-container-sync-meta: true/false
x-container-sync-sysmeta: comma separated list of other metadata items to sync