diff --git a/swift/container/reconciler.py b/swift/container/reconciler.py index f1ba782db4..9dbb5a6979 100644 --- a/swift/container/reconciler.py +++ b/swift/container/reconciler.py @@ -372,7 +372,7 @@ class ContainerReconciler(Daemon): an object was manually re-enqued. """ q_path = '/%s/%s/%s' % (MISPLACED_OBJECTS_ACCOUNT, container, obj) - x_timestamp = slightly_later_timestamp(q_record) + x_timestamp = slightly_later_timestamp(max(q_record, q_ts)) self.stats_log('pop_queue', 'remove %r (%f) from the queue (%s)', q_path, q_ts, x_timestamp) headers = {'X-Timestamp': x_timestamp} diff --git a/test/probe/test_container_merge_policy_index.py b/test/probe/test_container_merge_policy_index.py index 7f49971d58..795009e1bd 100644 --- a/test/probe/test_container_merge_policy_index.py +++ b/test/probe/test_container_merge_policy_index.py @@ -586,6 +586,13 @@ class TestContainerMergePolicyIndex(unittest.TestCase): acceptable_statuses=(4,), headers={'X-Backend-Storage-Policy-Index': int(old_policy)}) + # make sure the queue is settled + get_to_final_state() + for container in client.iter_containers('.misplaced_objects'): + for obj in client.iter_objects('.misplaced_objects', + container['name']): + self.fail('Found unexpected object %r in the queue' % obj) + def main(): options, commands = parser.parse_args()