-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: HS - can't cancel mass indexer job
PostPosted: Mon Feb 16, 2015 8:24 am 
Newbie

Joined: Fri Apr 04, 2014 4:37 am
Posts: 9
Location: Orleans - France
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.


Top
 Profile  
 
 Post subject: Re: HS - can't cancel mass indexer job
PostPosted: Thu Feb 19, 2015 8:16 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Hi,
sorry the cancel wasn't implemented yet.

this is https://hibernate.atlassian.net/browse/HSEARCH-655

I've scheduled it to be evaluated for the next sprint, since several people asked for this. If you'd like to help and patch it, that would be very appreciated!
Otherwise, fingers crossed I might be able to find some time myself in the next few weeks.

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: HS - can't cancel mass indexer job
PostPosted: Tue Mar 17, 2015 9:39 am 
Newbie

Joined: Fri Apr 04, 2014 4:37 am
Posts: 9
Location: Orleans - France
https://github.com/hibernate/hibernate-search/pull/805

First one for me. Tell me if anything is wrong.


Top
 Profile  
 
 Post subject: Re: HS - can't cancel mass indexer job
PostPosted: Tue Mar 17, 2015 4:10 pm 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
Looks great.
It's integrated, will be available to everyone in 5.2 !

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
 Post subject: Re: HS - can't cancel mass indexer job
PostPosted: Fri Apr 17, 2015 8:31 am 
Hibernate Team
Hibernate Team

Joined: Fri Oct 05, 2007 4:47 pm
Posts: 2536
Location: Third rock from the Sun
This is available now:
http://in.relation.to/Bloggers/MultiTenancyForHibernateSearchUsers520Beta1Released

thanks again!

_________________
Sanne
http://in.relation.to/


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.