for dir_name in dirmap:
(dirnode, metadata) = dirmap[dir_name]
if dirnode.get_readonly_uri() != self._upload_readonly_dircap:
- d2.addCallback(lambda ign, dir_name=dir_name:
+ d2.addCallback(lambda ign, dir_name=dir_name, dirnode=dirnode:
self._scan_remote_dmd(dir_name, dirnode, scan_batch))
- def _err(f):
+ def _err(f, dir_name=dir_name):
self._log("failed to scan DMD for client %r: %s" % (dir_name, f))
# XXX what should we do to make this failure more visible to users?
d2.addErrback(_err)
if dmd_last_downloaded_uri != local_last_downloaded_uri:
is_conflict = True
self._count('objects_conflicted')
-
- #dmd_last_uploaded_uri = metadata.get('last_uploaded_uri', None)
- #local_last_uploaded_uri = ...
-
+ else:
+ dmd_last_uploaded_uri = metadata.get('last_uploaded_uri', None)
+ local_last_uploaded_uri = self._db.get_last_uploaded_uri(relpath_u)
+ print ">>>> if %r != %r" % (dmd_last_uploaded_uri, local_last_uploaded_uri)
+ if dmd_last_uploaded_uri != local_last_uploaded_uri:
+ is_conflict = True
+ self._count('objects_conflicted')
if relpath_u.endswith(u"/"):
if metadata.get('deleted', False):
self._log("rmdir(%r) ignored" % (abspath_u,))