Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-5326

Not able to move segment store directory on filesystem after closing FileStore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.5.13
    • 1.5.18, 1.6.0
    • upgrade
    • None
    • Windows 2012 R2,
      Java(TM) SE Run-time Environment (build 1.8.0_74-b02)

    Description

      The JVM process that uses oak-upgrade library for upgrading Oak repository is not able to move source (and probably destination) repository after making sure that both file stores are closed.

      oak-upgrade
      16.12.2016 17:15:31.463 INFO   o.a.j.o.u.RepositorySidegrade: Copying node #770000: 
      16.12.2016 17:15:38.604 INFO   o.a.j.o.u.RepositorySidegrade: Copying node #780000: 
      16.12.2016 17:15:39.495 INFO   o.a.j.o.u.RepositorySidegrade: Copying node #790000: 
      16.12.2016 17:15:41.182 INFO   o.a.j.o.s.f.FileStore: TarMK closed: C:\workspace\repository-segment-tar-20161216-171300\segmentstore
      16.12.2016 17:15:41.370 INFO   o.a.j.o.p.s.f.FileStore: TarMK closed: C:\workspace\repository\segmentstore
      16.12.2016 17:17:11.604 ERROR  java.io.IOException: Unable to delete file: C:\workspace\repository\segmentstore\journal.log
      	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2381) ~
      	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1679) ~
      	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1575) ~
      	at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2916) ~
      ...
      

      Please also note that --disable-mmap option is passed to avoid OAK-4274.

      Is there any way to make all operations synchronised and finished after the migration is executed using the API method: OakUpgrade.migrate(MigrationOptions options, StoreArguments stores, DatastoreArguments datastores) throws IOException, CliArgumentException

      This leads to a weird experience when filesystem clean up (reordering) is needed.

      On Unix the segmentstore folder might be moved as UNIX fs implementation is not so restrictive. On Windows it is not possible.

      Attachments

        Issue Links

          Activity

            People

              arkadius Arek Kita
              arkadius Arek Kita
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: