Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-23333

Fix possible infinite loop with Drive on a folderish document with the Collection facet

    XMLWordPrintable

    Details

    • Release Notes Summary:
      Drive can synchronize a folderish document with the Collection facet
    • Sprint:
      nxfit 9.3.8
    • Story Points:
      5

      Description

      The following stack trace was observed, not knowing exactly how it can occur:

      at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.handleCollectionMember(AbstractDocumentBackedFileSystemItem.java:141)
      	at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.<init>(AbstractDocumentBackedFileSystemItem.java:116)
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.<init>(DocumentBackedFolderItem.java:98)
      	
      	at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.adaptDocument(DefaultFileSystemItemFactory.java:204)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:246)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:106)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:336)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:168)
      	at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.<init>(AbstractDocumentBackedFileSystemItem.java:104)
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.<init>(DocumentBackedFolderItem.java:98)
      	
      	at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.adaptDocument(DefaultFileSystemItemFactory.java:204)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:246)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:106)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:336)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:168)
      	
      	at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.handleCollectionMember(AbstractDocumentBackedFileSystemItem.java:141)
      	at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.<init>(AbstractDocumentBackedFileSystemItem.java:116)
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.<init>(DocumentBackedFolderItem.java:98)
      	
      	at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.adaptDocument(DefaultFileSystemItemFactory.java:204)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:246)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:106)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:336)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:168)
      	at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.<init>(AbstractDocumentBackedFileSystemItem.java:104)
      	at org.nuxeo.drive.adapter.impl.DocumentBackedFolderItem.<init>(DocumentBackedFolderItem.java:98)
      	
      	at org.nuxeo.drive.service.impl.DefaultFileSystemItemFactory.adaptDocument(DefaultFileSystemItemFactory.java:204)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:246)
      	
      	at org.nuxeo.drive.service.impl.AbstractFileSystemItemFactory.getFileSystemItem(AbstractFileSystemItemFactory.java:106)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:336)
      	
      	at org.nuxeo.drive.service.impl.FileSystemItemAdapterServiceImpl.getFileSystemItem(FileSystemItemAdapterServiceImpl.java:168)
      	
      	at org.nuxeo.drive.adapter.impl.AbstractDocumentBackedFileSystemItem.handleCollectionMember(AbstractDocumentBackedFileSystemItem.java:141)
      

      Yet, we've managed to have a reproduction case with a unit test using a folderish document with the Collection facet, see below.
      Note that such a document type exists: EasyShareFolder.

      - Folder -> isMemberOf(FolderishCollection)
           |
           |__ FolderishCollection (Folder with the Collection facet)
      
      - CollectionSyncRoot (Collection document registered as a synchronization root)
      
      - File -> isMemberOf(FolderishCollection, CollectionSyncRoot)
      

      This also happens if Folder is member of another child folder with the Collection facet than the one of which File is a member.

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 2 hours
                1d 2h