New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't delete recursive when binary not found #235

Closed
SiNEXiST opened this Issue Dec 15, 2017 · 0 comments

Comments

Projects
None yet
2 participants
@SiNEXiST
Contributor

SiNEXiST commented Dec 15, 2017

Gentics Mesh Version, operating system, or hardware.

  • v0.11.5

Operating System

  • Linux

JVM

  • Open JDK 1.8.0_141

Problem

When attempting to delete a directory with all Nodes inside via the UI, it fails without any notice.
Server-Log:

22:47.092 [Nostalgic Ferrothorn] ERROR [vert.x-worker-thread-19] [OrientDBDatabase.java:860] - Error handling transaction
io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: /opt/mesh-server/data/binaryFiles/2e/99/2e99f5c959ff4db799f5c959ff2db762.bin
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:608) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:585) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60) ~[mesh-server-0.11.5.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_141]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_141]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_141]
Caused by: java.nio.file.NoSuchFileException: /opt/mesh-server/data/binaryFiles/2e/99/2e99f5c959ff4db799f5c959ff2db762.bin
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_141]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_141]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_141]
        at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) ~[na:1.8.0_141]
        at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) ~[na:1.8.0_141]
        at java.nio.file.Files.delete(Files.java:1126) ~[na:1.8.0_141]
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:605) ~[mesh-server-0.11.5.jar:na]
        ... 6 common frames omitted
13:22:47.092 [Nostalgic Ferrothorn] ERROR [vert.x-worker-thread-19] [OrientDBDatabase.java:860] - Error handling transaction
io.vertx.core.file.FileSystemException: java.nio.file.NoSuchFileException: /opt/mesh-server/data/binaryFiles/2e/99/2e99f5c959ff4db799f5c959ff2db762.bin
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:608) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:585) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60) ~[mesh-server-0.11.5.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_141]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_141]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_141]
Caused by: java.nio.file.NoSuchFileException: /opt/mesh-server/data/binaryFiles/2e/99/2e99f5c959ff4db799f5c959ff2db762.bin
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_141]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_141]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_141]
        at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) ~[na:1.8.0_141]
        at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) ~[na:1.8.0_141]
        at java.nio.file.Files.delete(Files.java:1126) ~[na:1.8.0_141]
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:605) ~[mesh-server-0.11.5.jar:na]
        ... 6 common frames omitted
13:22:47.093 [Nostalgic Ferrothorn] ERROR [vert.x-eventloop-thread-0] [FailureHandler.java:98] - Error for request in path: /api/v1/kofl/nodes/6107c7be308341a287c7be308301a2e7?lang=de&recursive=true
13:22:47.093 [Nostalgic Ferrothorn] ERROR [vert.x-eventloop-thread-0] [FailureHandler.java:100] - Error:
java.nio.file.NoSuchFileException: /opt/mesh-server/data/binaryFiles/2e/99/2e99f5c959ff4db799f5c959ff2db762.bin
        at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86) ~[na:1.8.0_141]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_141]
        at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_141]
        at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:244) ~[na:1.8.0_141]
        at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103) ~[na:1.8.0_141]
        at java.nio.file.Files.delete(Files.java:1126) ~[na:1.8.0_141]
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:605) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.file.impl.FileSystemImpl$9.perform(FileSystemImpl.java:585) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$1(ContextImpl.java:273) ~[mesh-server-0.11.5.jar:na]
        at io.vertx.core.impl.TaskQueue.lambda$new$0(TaskQueue.java:60) ~[mesh-server-0.11.5.jar:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_141]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_141]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_141]

Request-Response:

{
  "message" : "/opt/mesh-server/data/binaryFiles/2e/99/2e99f5c959ff4db799f5c959ff2db762.bin"
}

The more troublesome issue is, that none of the nodes which should be deleted have any binary fields. Also the the node from the Response 2e99f5c959ff4db799f5c959ff2db762 doesn't have any which raises some questions on how they are getting deleted.

It's still possible to delete these nodes individually, just not recursive.

Reproducer

  • Create a Schema with a binary-field (Schema A)
  • Create another Schema which has a node-field (Schema B)
  • Create a Folder-Node (Folder)
  • Create a Node with Schema A and a binary content (Image, File, ...)
  • Create a Folder Node
  • Create a Schema B Node inside the Folder Node. Set the reference to Node A
  • Attempt to delete the Folder Node

Seems like it's checking for binaries even if they aren't directly accessed.

Expected behaviour and actual behaviour

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment