Metadata can be missing by account/container replication

Bug #1570118 reported by Daisuke Morita
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Object Storage (swift)
High
Daisuke Morita

Bug Description

Account/Container replicator sometimes uses rsync for db replication if difference between local and remote becomes big. However, if db file to be sent to remote server contains older metadata info, remote db file will be overwritten and some metadata can be missing.

In the 'sync' op, response from a remote server contains remote server's metadata info, but currently that metadata value is not used anywhere. This issue can be solved by simply syncing metadata with this remote value before rsync.

Changed in swift:
assignee: nobody → Daisuke Morita (morita-daisuke)
Changed in swift:
status: New → In Progress
Revision history for this message
Kota Tsuyuzaki (tsuyuzaki-kota) wrote :
Revision history for this message
Kota Tsuyuzaki (tsuyuzaki-kota) wrote :

I think this is really good catch because current db_repllicator probably has a chance to loose the db metadata at rsync_then_merge process. I confirmed the behavior, sync can keep the metadata but rsync_then_merge will loose the metadata, with attachment patch.

Changed in swift:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/302494
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=843184f3fea18db367e40cb5f46fc0cb8f2432f6
Submitter: Jenkins
Branch: master

commit 843184f3fea18db367e40cb5f46fc0cb8f2432f6
Author: Daisuke Morita <email address hidden>
Date: Wed Apr 6 19:02:28 2016 -0700

    Sync metadata in 'rsync_then_merge' in db_replicator

    In previous 'rsync_then_merge' remote objects are merged with
    rsync'ed local objects, but remote metadata is not merged with local
    one. Account/Container replicator sometimes uses rsync for db sync if
    there is a big difference of record history in db files between 'local'
    and 'remote' servers. If replicator needs to rsync local db to remote
    but metadata in local db is older, older info of metadata can be
    distributed then some metadata values can be missing or go back to older.

    This patch fixes this problem by merging 'remote' metadata with
    rsync'ed local db file.

    Closes-Bug: #1570118

    Change-Id: Icdf0a936fc456c5462471938cbc365bd012b05d4

Changed in swift:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/swift 2.15.0

This issue was fixed in the openstack/swift 2.15.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers