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:
Reviewed: https:/ /review. openstack. org/232931 /git.openstack. org/cgit/ openstack/ swift/commit/ ?id=4a13dcc4a8d 7c890ff322190ca 80fbb460b55de4
Committed: https:/
Submitter: Jenkins
Branch: master
commit 4a13dcc4a8d7c89 0ff322190ca80fb b460b55de4
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 'max_row' ]) < 0.5:
# more than 50%, rsync then do a remote merge.
if rinfo['max_row'] / float(info[
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 'max_row' ]) < 0.5 and \
info['max_ row'] - rinfo['max_row'] > self.per_diff:
# 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[
Change-Id: I9e779f71bf3771 4919a525404565d d075762b0d4
Closes-bug: #1019712