Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-13591

Backups fail if a proto schema key contains forward slashes

XMLWordPrintable

      The key of the internal query.proto file in the internal cache is org/infinispan/query/remote/client/query.proto. So the InternalCacheResource creates the /server/data/backups/aws-prod/containers/default/proto-schemas as expected, but it then tries to write org/infinispan/query/remote/client/query.proto as a file but that won't work as the / are interpreted as dirs, resulting in the following exception being thrown:

      infinispan 12:51:45,451 DEBUG (non-blocking-thread--p2-t2) [org.infinispan.server.core.backup.BackupManagerImpl] Exception encountered when creating a cluster backup java.util.concurrent.CompletionException: org.infinispan.commons.CacheException: Unable to create /opt/infinispan/server/data/backups/aws-prod/containers/default/proto-schemas/org/infinispan/query/remote/client/query.proto
      infinispan     at java.base/java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
      infinispan     at java.base/java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
      infinispan     at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1739)
      infinispan     at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      infinispan     at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
      infinispan     at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
      infinispan     at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1348)
      infinispan     at java.base/java.lang.Thread.run(Thread.java:829)
      infinispan Caused by: org.infinispan.commons.CacheException: Unable to create /opt/infinispan/server/data/backups/aws-prod/containers/default/proto-schemas/org/infinispan/query/remote/client/query.proto
      infinispan     at org.infinispan.server.core.backup.resources.InternalCacheResource.lambda$backup$0(InternalCacheResource.java:84)
      infinispan     at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1736)
      infinispan     ... 5 more
      infinispan Caused by: java.nio.file.NoSuchFileException: /opt/infinispan/server/data/backups/aws-prod/containers/default/proto-schemas/org/infinispan/query/remote/client/query.proto
      infinispan     at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
      infinispan     at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
      infinispan     at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
      infinispan     at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
      infinispan     at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
      infinispan     at java.base/java.nio.file.Files.newOutputStream(Files.java:220)
      infinispan     at java.base/java.nio.file.Files.write(Files.java:3425)
      infinispan     at org.infinispan.server.core.backup.resources.InternalCacheResource.lambda$backup$0(InternalCacheResource.java:82)
      infinispan     ... 6 more
      

              remerson@redhat.com Ryan Emerson
              remerson@redhat.com Ryan Emerson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: