swift/swift/obj
Alistair Coles 1dceafa7d5 ssync: sync non-durable fragments from handoffs
Previously, ssync would not sync nor cleanup non-durable data
fragments on handoffs. When the reconstructor is syncing objects from
a handoff node (a 'revert' reconstructor job) it may be useful, and is
not harmful, to also send non-durable fragments if the receiver has
older or no fragment data.

Several changes are made to enable this. On the sending side:

  - For handoff (revert) jobs, the reconstructor instantiates
    SsyncSender with a new 'include_non_durable' option.
  - If configured with the include_non_durable option, the SsyncSender
    calls the diskfile yield_hashes function with options that allow
    non-durable fragments to be yielded.
  - The diskfile yield_hashes function is enhanced to include a
    'durable' flag in the data structure yielded for each object.
  - The SsyncSender includes the 'durable' flag in the metadata sent
    during the missing_check exchange with the receiver.
  - If the receiver requests the non-durable object, the SsyncSender
    includes a new 'X-Backend-No-Commit' header when sending the PUT
    subrequest for the object.
  - The SsyncSender includes the non-durable object in the collection
    of synced objects returned to the reconstructor so that the
    non-durable fragment is removed from the handoff node.

On the receiving side:

  - The object server includes a new 'X-Backend-Accept-No-Commit'
    header in its response to SSYNC requests. This indicates to the
    sender that the receiver has been upgraded to understand the
    'X-Backend-No-Commit' header.
  - The SsyncReceiver is enhanced to consider non-durable data when
    determining if the sender's data is wanted or not.
  - The object server PUT method is enhanced to check for and
    'X-Backend-No-Commit' header before committing a diskfile.

If a handoff sender has both a durable and newer non-durable fragment
for the same object and frag-index, only the newer non-durable
fragment will be synced and removed on the first reconstructor
pass. The durable fragment will be synced and removed on the next
reconstructor pass.

Change-Id: I1d47b865e0a621f35d323bbed472a6cfd2a5971b
Closes-Bug: 1778002
2021-01-20 12:00:10 +00:00
..
watchers Let developers/operators add watchers to object audit 2020-12-26 17:16:14 -06:00
__init__.py Initial commit of Swift code 2010-07-12 17:03:45 -05:00
auditor.py Let developers/operators add watchers to object audit 2020-12-26 17:16:14 -06:00
diskfile.py ssync: sync non-durable fragments from handoffs 2021-01-20 12:00:10 +00:00
expirer.py replace md5 with swift utils version 2020-12-15 09:52:55 -05:00
mem_diskfile.py replace md5 with swift utils version 2020-12-15 09:52:55 -05:00
mem_server.py Per-policy DiskFile classes 2015-04-14 00:52:16 -07:00
reconstructor.py ssync: sync non-durable fragments from handoffs 2021-01-20 12:00:10 +00:00
replicator.py Fix up some log message grammar 2020-12-17 09:24:51 -08:00
server.py ssync: sync non-durable fragments from handoffs 2021-01-20 12:00:10 +00:00
ssync_receiver.py ssync: sync non-durable fragments from handoffs 2021-01-20 12:00:10 +00:00
ssync_sender.py ssync: sync non-durable fragments from handoffs 2021-01-20 12:00:10 +00:00
updater.py Merge "object-updater: Ignore ENOENT when trying to unlink stale pending files" 2020-05-17 05:08:59 +00:00