Uploaded image for project: 'XWiki Commons'
  1. XWiki Commons
  2. XCOMMONS-3836

The filesystem blob store fails to list or delete blobs that are deleted concurrently

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 17.10.0
    • Store
    • None
    • Unknown

    Description

      listDescendants uses Files.walk. A directory deleted during the walk, by another thread or another cluster member on a shared directory, throws UncheckedIOException(NoSuchFileException) from the stream and aborts the whole listing; hasDescendants is affected too. deleteDescendants uses PathUtils.deleteDirectory, whose visitor rethrows NoSuchFileException for a directory removed during the walk.

      Expected: blobs that disappear during a listing are skipped, and deleting something already gone is not an error (idempotent deletion, documented in the BlobStore javadoc).

      Possible fix: an own FileVisitor whose visitFileFailed continues on NoSuchFileException, and a missing root treated as empty. The listing failure was reproduced with a plain JDK test; the deletion failure comes from reading the commons-io code.

      Attachments

        Activity

          People

            ciaens Clément Christiaens
            ciaens Clément Christiaens
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: