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

The background flush operation might flush a closed store

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.5.13, 1.6.0
    • segment-tar
    • None

    Description

      The background flush operation might invoke flush after the TAR writer (and the store in general) is either closed or in the process of being closed. This is an example execution.

      27.10.2016 23:42:32.533 WARN   o.a.j.o.s.f.Scheduler: The scheduler FileStore background tasks takes too long to shutdown
      27.10.2016 23:43:22.574 WARN   o.a.j.o.s.f.FileStore: Failed to flush the TarMK at crx-quickstart/repository/segmentstore
      java.io.IOException: Stream Closed
              at java.io.RandomAccessFile.writeBytes0(Native Method) ~[na:1.7.0_75]
              at java.io.RandomAccessFile.writeBytes(RandomAccessFile.java:520) ~[na:1.7.0_75]
              at java.io.RandomAccessFile.writeBytes(RandomAccessFile.java:1123) ~[na:1.7.0_75]
              at org.apache.jackrabbit.oak.segment.file.TarRevisions.flush(TarRevisions.java:209) ~[crx2oak-1.5.6-all-in-one.jar:1.5.6]
              at org.apache.jackrabbit.oak.segment.file.FileStore.flush(FileStore.java:365) ~[crx2oak-1.5.6-all-in-one.jar:1.5.6]
              at org.apache.jackrabbit.oak.segment.file.FileStore$2.run(FileStore.java:207) ~[crx2oak-1.5.6-all-in-one.jar:1.5.6]
              at org.apache.jackrabbit.oak.segment.file.SafeRunnable.run(SafeRunnable.java:67) [crx2oak-1.5.6-all-in-one.jar:1.5.6]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_75]
              at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:304) [na:1.7.0_75]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_75]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.7.0_75]
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      27.10.2016 23:43:23.988 INFO   o.a.j.o.s.f.FileStore: TarMK closed: crx-quickstart/repository/segmentstore
      27.10.2016 23:43:24.262 INFO   o.a.j.o.p.s.f.FileStore: TarMK closed: crx-quickstart/repository-old/segmentstore
      

      Flushing the store should not executing any significant operation on the underlying file system objects when the store is closed, even if it's not possible to shut down the scheduler in a timely fashion.

      Attachments

        Activity

          People

            frm Francesco Mari
            frm Francesco Mari
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: