Tagbangers Blog

ISPN000055: Unexpected error in AsyncStoreCoordinator thread. AsyncCacheWriter is dead!

全文検索インデックスを再構築した時の「ISPN000055: Unexpected error in AsyncStoreCoordinator thread. AsyncCacheWriter is dead!」の対処法。

環境

Hibernate Search 4.5.1.Final
Infinispan 6.0.2.Final 

Stacktrace

[AsyncStoreCoordinator-LuceneIndexesData] ERROR o.i.p.async.AsyncCacheWriter - ISPN000055: Unexpected error in AsyncStoreCoordinator thread. AsyncCacheWriter is dead!
org.infinispan.util.concurrent.TimeoutException: ISPN000233: Waiting on work threads latch failed: java.util.concurrent.CountDownLatch@21cd8fea[Count = 6]
	at org.infinispan.persistence.async.AsyncCacheWriter$AsyncStoreCoordinator.workerThreadsAwait(AsyncCacheWriter.java:297) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
	at org.infinispan.persistence.async.AsyncCacheWriter$AsyncStoreCoordinator.run(AsyncCacheWriter.java:254) ~[infinispan-core-6.0.2.Final.jar:6.0.2.Final]
	at java.lang.Thread.run(Thread.java:744) ~[na:1.7.0_51]<br>

解決策

キャッシュへの反映にタイムアウトしているので、とりあえずタイムアウトまでの時間を延長する。

ConfigurationBuilderHolder holder = new ConfigurationBuilderHolder();
ConfigurationBuilder defaultBuilder = holder.getDefaultConfigurationBuilder();
defaultBuilder
	.transaction()
		.cacheStopTimeout(10, TimeUnit.MINUTES)
	...skip

JdbcStringBasedStoreConfigurationBuilder jdbcBuilder = new JdbcStringBasedStoreConfigurationBuilder(defaultBuilder.persistence());
jdbcBuilder
	.async()
		.enable()
		.shutdownTimeout(10, TimeUnit.MINUTES)
	...skip