You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Francesco Mari (JIRA)" <ji...@apache.org> on 2016/11/21 14:19:58 UTC

[jira] [Commented] (OAK-5135) The flush of written data via TarRevisions is asynchronous in relation to FileStore.close()

    [ https://issues.apache.org/jira/browse/OAK-5135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15683670#comment-15683670 ] 

Francesco Mari commented on OAK-5135:
-------------------------------------

At r1770690 I increased the amount of time the Scheduler waits for its tasks to complete. Moreover, if a timeout occurs, a forced shutdown is started. [~arkadius], can you try this solution locally and provide feedback?

> The flush of written data via TarRevisions is asynchronous in relation to FileStore.close()
> -------------------------------------------------------------------------------------------
>
>                 Key: OAK-5135
>                 URL: https://issues.apache.org/jira/browse/OAK-5135
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: segment-tar
>    Affects Versions: 1.5.13
>            Reporter: Arek Kita
>            Assignee: Francesco Mari
>            Priority: Critical
>             Fix For: 1.6, 1.5.15
>
>
> *Expected behavior*: {{FileStore.close()}} should wait for any written data to be flushed to disk
> *Actual behavior*: {{FileStore.close()}} does not wait for flushing data
> {code:title=Migration log}
> 21.11.2016 12:00:59.792 WARN   o.a.j.o.s.f.Scheduler: The scheduler FileStore background tasks takes too long to shutdown
> 21.11.2016 12:01:10.363 INFO   o.a.j.o.s.f.FileStore: TarMK closed: /data/cq/crx-quickstart/repository-segment-tar-20161121-120039/segmentstore
> 21.11.2016 12:01:10.625 INFO   o.a.j.o.p.s.f.FileStore: TarMK closed: /data/cq/crx-quickstart/repository/segmentstore
> ...
> ### The above directories are swapped/moved here etc ###
> ...
> 21.11.2016 12:01:10.646 WARN   o.a.j.o.s.f.FileStore: Failed to flush the TarMK at /data/cq/crx-quickstart/repository-segment-tar-20161121-120039/segmentstore
> java.io.IOException: Stream Closed
>     at java.io.RandomAccessFile.writeBytes(Native Method) ~[na:1.8.0_101]
>     at java.io.RandomAccessFile.writeBytes(RandomAccessFile.java:1100) ~[na:1.8.0_101]
>     at org.apache.jackrabbit.oak.segment.file.TarRevisions.flush(TarRevisions.java:209) 
>     at org.apache.jackrabbit.oak.segment.file.FileStore.flush(FileStore.java:358) 
>     at org.apache.jackrabbit.oak.segment.file.FileStore$2.run(FileStore.java:221) 
>     at org.apache.jackrabbit.oak.segment.file.SafeRunnable.run(SafeRunnable.java:67) 
>     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101]
>     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [na:1.8.0_101]
>     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_101]
>     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [na:1.8.0_101]
>     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
>     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
>     at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)