Comment 7 for bug 1019712

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/232931
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=4a13dcc4a8d7c890ff322190ca80fbb460b55de4
Submitter: Jenkins
Branch: master

commit 4a13dcc4a8d7c890ff322190ca80fbb460b55de4
Author: Matthew Oliver <email address hidden>
Date: Fri Oct 9 17:25:08 2015 +1100

    Make db_replicator usync smaller containers

    The current rule inside the db_replicator is to rsync+merge
    containers during replication if the difference between rowids
    differ by more than 50%:

      # if the difference in rowids between the two differs by
      # more than 50%, rsync then do a remote merge.
      if rinfo['max_row'] / float(info['max_row']) < 0.5:

    This mean on smaller containers, that only have few rows, and differ
    by a small number still rsync+merge rather then copying rows.

    This change adds a new condition, the difference in the rowids must
    be greater than the defined per_diff otherwise usync will be used:

      # if the difference in rowids between the two differs by
      # more than 50% and the difference is greater than per_diff,
      # rsync then do a remote merge.
      # NOTE: difference > per_diff stops us from dropping to rsync
      # on smaller containers, who have only a few rows to sync.
      if rinfo['max_row'] / float(info['max_row']) < 0.5 and \
              info['max_row'] - rinfo['max_row'] > self.per_diff:

    Change-Id: I9e779f71bf37714919a525404565dd075762b0d4
    Closes-bug: #1019712