-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.3.1107
-
Fix Version/s: 2.0.0522
-
Component/s: Folder filtering, Remote client
Detected with SUPNXP-12039
This is because of RemoteFilteredFileSystemClient#get_changes:
def get_changes(self, server_binding): result = super(RemoteFilteredFileSystemClient, self).get_changes( server_binding) log.trace("result['hasTooManyChanges'] = %r", result['hasTooManyChanges']) # Need to filter the result and add filterevents # Force the scan of the server every time now, need to compare to last # date filter # Need to multiply the last_filter_date by 1000 as the last_sync_date # come from nuxeo log.trace("server_binding.last_filter_date = %r", server_binding.last_filter_date) if server_binding.last_filter_date: log.trace("server_binding.last_sync_date = %r", server_binding.last_sync_date) if (server_binding.last_filter_date and server_binding.last_sync_date < ( server_binding.last_filter_date * 1000)): log.trace("server_binding.last_sync_date < (server_binding.last_filter_date * 1000)" " => setting result['hasTooManyChanges'] to True") result['hasTooManyChanges'] = True return result
When the client clock is ahead of the server one, server_binding.last_sync_date which is sent by the server in the change summary is always lesser than server_binding.last_filter_date which si computed client-side in Filter#add or Filter#remove:
server_binding.last_filter_date = time()
Then in Synchronizer#update_synchronize_server, as summary['hasTooManyChanges'] == True, the remote scan is performed:
if full_scan or summary['hasTooManyChanges'] or first_pass: # Force remote full scan log.debug("Remote full scan of %s. Reasons: " "forced: %r, too many changes: %r, first pass: %r", server_binding.local_folder, full_scan, summary['hasTooManyChanges'], first_pass) self.scan_remote(server_binding, session=session)