-
Type: Bug
-
Status: Resolved
-
Priority: Minor
-
Resolution: Fixed
-
Affects Version/s: 1.3.1216
-
Component/s: Synchronizer
-
Sprint:Sprint Drive 7.2-2
-
Story Points:2
Detected with an event listener moving documents from a sync root to a non sync root on "documentCreated" => file is not locally deleted.
This is happening because:
- Local creation triggers Synchronizer._synchronize_locally_created which uploads the file to a new document:
def _synchronize_locally_created(self, doc_pair, session, local_client, remote_client, local_info, remote_info): ... log.debug("Creating remote document '%s' in folder '%s'", name, parent_pair.remote_name) remote_ref = remote_client.stream_file( parent_ref, doc_pair.get_local_abspath(), filename=name)
- Document is immediately moved server-side.
- Next call in this function fails:
doc_pair.update_remote(remote_client.get_info(remote_ref))
with:
2015-01-26 15:22:38,256 18256 14552 TRACE nxdrive.client.base_automation_client Response for 'http://localhost:8080/nuxeo/site/automation/NuxeoDrive.GetFileSystemItem' with cookies []: 'null' 2015-01-26 15:22:38,256 18256 14552 ERROR nxdrive.synchronizer Failed to sync LastKnownState<local_folder=u'Nuxeo Drive', local_path=u'/Facture_re\xe7ue_papier/testNuxeoDrive-000.pdf', remote_name=None, local_state=u'created', remote_state=u'unknown', pair_state=u'locally_created', error_count=0>, blacklisting doc pair for 300 seconds Traceback (most recent call last): File "nuxeo-drive-client\nxdrive\synchronizer.py", line 1513, in synchronize File "nuxeo-drive-client\nxdrive\synchronizer.py", line 799, in synchronize_one File "nuxeo-drive-client\nxdrive\synchronizer.py", line 978, in _synchronize_locally_created File "nuxeo-drive-client\nxdrive\client\remote_file_system_client.py", line 62, in get_info NotFound: Could not find 'defaultFileSystemItemFactory#default#da03e102-4e00-4116-bebc-98fcefcf5cd1' on 'http://localhost:8080/nuxeo/'
because the doc cannot be adapted as a FileSystemItem as no more under a sync root.
- is required by
-
NXDRIVE-216 Forward-port commits from 1.4 that were made after V2 was started
- Resolved