提交 468144b9 编写于 作者: H Hou Tianze

Fix multiprocess upload/syncup missing some files

- Cause: Baidu will give error {'error_code': 31061, 'error_msg': 'file already exists'} for multiprocess upload as the intermediate directories are being created almost simultaneously.
- Fix: Retry on error 31061 (previously, we don't retry)
上级 5143b778
......@@ -51,5 +51,6 @@ nosetests.xml
bypy/test/**/*.bin
bypy/test/downdir/
bypy/test/sharedir/
bypy/test/configdir/bypy.setting.json
bypy/test/configdir/bypy.hashcache.json
.vscode/tags
......@@ -689,7 +689,7 @@ class ByPy(object):
self.pd("206 Partial Content (this is OK), processing action")
result = act(r, actargs)
if result == const.ENoError:
self.pd("Request all goes fine")
self.pd("Request OK.")
else:
ec = self.__get_json_errorcode(r, act)
# 6 (sc: 403): No permission to access user data
......@@ -717,7 +717,7 @@ class ByPy(object):
result = ec
# errors that make retrying meaningless
elif (
ec == 31061 or # sc == 400 file already exists
#ec == 31061 or # sc == 400 file already exists
ec == 31062 or # sc == 400 file name is invalid
ec == 31063 or # sc == 400 file parent path does not exist
ec == 31064 or # sc == 403 file is not authorized
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册