Uploaded image for project: 'Zeppelin'
  1. Zeppelin
  2. ZEPPELIN-4305

LocalStorageConfig.atomicWriteToFile incorrectly works with several mount points

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 0.9.0
    • 0.9.0
    • None
    • None

    Description

      The hotfix made on 24th July, changed the code of that function to

            file.getParentFile().mkdirs();
            Files.move(tempFile.toPath(), destinationFilePath,
                    StandardCopyOption.ATOMIC_MOVE);
      

      but this generates AtomicMoveNotSupportedException when temporary directory is on separate disk as destination directory (like in my case, where /home is on separate disk):

      java.nio.file.AtomicMoveNotSupportedException: /tmp/interpreter.json2988796503687403554.tmp -> /home/ott/work/zeppelin/zeppelin-ksql/conf/interpreter.json: Invalid cross-device link
      	at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:394)
      	at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
      	at java.nio.file.Files.move(Files.java:1395)
      	at org.apache.zeppelin.storage.LocalConfigStorage.atomicWriteToFile(LocalConfigStorage.java:126)
      	at org.apache.zeppelin.storage.LocalConfigStorage.save(LocalConfigStorage.java:59)
      	at org.apache.zeppelin.interpreter.InterpreterSettingManager.saveToFile(InterpreterSettingManager.java:311)
      

      Attachments

        Activity

          People

            alexott Alex Ott
            alexott Alex Ott
            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 - 0h
                0h
                Logged:
                Time Spent - 2h 50m
                2h 50m