[ https://issues.apache.org/jira/browse/GEODE-2862?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Fred Krone updated GEODE-2862: ------------------------------ Labels: storage_3 (was: ) > shutdown hook does not wait for disk store async tasks to complete > ------------------------------------------------------------------ > > Key: GEODE-2862 > URL: https://issues.apache.org/jira/browse/GEODE-2862 > Project: Geode > Issue Type: Bug > Components: persistence > Affects Versions: 1.0.0-incubating > Reporter: Darrel Schneider > Labels: storage_3 > > If you do a normal cache close and are using persistence then each disk store > close will wait for all of its async background tasks to complete. > But if instead the JVM shutdown hook is used (see > java.lang.Runtime.addShutdownHook(Thread) for a description of what causes > the shutdown hook to be called) then it will not wait for the async > persistent tasks to complete. > Both of these types of shutdown are considered an orderly shutdown (as > opposed to a unorderly shutdown caused by things like a kill -9) and geode > should only have one type of orderly shutdown. By not waiting for the async > persistent tasks to complete some files may never be fully written. > Here is the code that causes the shutdown hook to not wait in DiskStoreImpl: > {code} > // don't block the shutdown hook > if (Thread.currentThread() != InternalDistributedSystem.shutdownHook) { > waitForBackgroundTasks(); > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)