Skip to content

Commit 6934e6a

Browse files
committed
Force master to list all parts when completing MPU
(or when arborting MPU)
1 parent b9e9836 commit 6934e6a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

swift3/controllers/multi_upload.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,10 @@ def DELETE(self, req):
628628
'delimiter': '/',
629629
}
630630

631+
# Force the master to be sure to fetch all uploaded parts
632+
req.environ.setdefault('oio.query', {})
633+
req.environ['oio.query']['force_master'] = True
634+
631635
resp = req.get_response(self.app, 'GET', container, '', query=query)
632636

633637
# Iterate over the segment objects and delete them individually
@@ -669,6 +673,10 @@ def POST(self, req):
669673
'delimiter': '/'
670674
}
671675

676+
# Force the master to be sure to fetch all uploaded parts
677+
req.environ.setdefault('oio.query', {})
678+
req.environ['oio.query']['force_master'] = True
679+
672680
container = req.container_name + MULTIUPLOAD_SUFFIX
673681
resp = req.get_response(self.app, 'GET', container, '', query=query)
674682
objinfo = json.loads(resp.body)

0 commit comments

Comments
 (0)