Container sync doesn't sync last rowid
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Object Storage (swift) |
Fix Released
|
Undecided
|
Dan H |
Bug Description
Occasionally an object won't get synced to the remote container. This happens most often when one of the object servers is down. No matter how many times container sync runs, it doesn't send the last remaining object to be synced. The problem would resolve itself as soon as a new object was added to the container.
The reason for the behavior is this code:
if row['ROWID'] >= sync_point1:
Instead of updating the last rowid, the code breaks, leaving sync_point2 one less than sync_point1 and continually entering the first "all updates" while loop on each subsequent run.
The proposed fix is :
if row['ROWID'] > sync_point1:
By only breaking if the rowid is greater than sync_point1, the last row is synced and sync_point2 is updated to be equal to sync_point1.
This unit test comment seems to imply an expected deviation that does not result in a container sync: "Succeeds because the two sync points haven't deviated enough yet." If that's the case, the last object still needs to be synced. If not, we can fix the test case by making the FakeContainerBr
I can add the code change once my request to join Swift Contributors is approved.
Swift 1.7.5
Changed in swift: | |
milestone: | none → 1.7.6 |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/16491
Review: https:/