A short question about HS massIndexer.
I wrap massIndexing task in a springbatch job, deployed in JBoss Eap. The task may be running many hours (2 or 3) depending on sgbd size.
I do the following in a first request :
Code:
Future<?> indexTask = fullTextEntityManager.createIndexer().purgeAllOnStart(true).batchSizeToLoadObjects(batchSizeToLoadObjects)
.cacheMode(CacheMode.IGNORE).threadsToLoadObjects(threadsToLoadObjects).idFetchSize(idFetchSize)
.threadsForSubsequentFetching(threadsForSubsequentFetching).progressMonitor(monitor).start();
Sometimes I want to cancel the running job. And then I do in another request :
Code:
indexTask.cancel(true);
I expect here that my job is stopped and that indexing is also stopped. It's not the case, index continue to grow up. I think it comes from o.h.s.b.i.BatchCoordinator which interrupt current thread on InterruptedException but doesn't shutdown indexing thread launched using ExecutorService.
What do you think about it ? Is what I'm expecting right or is there another way to do it.