Bug 845896 - Ensure that Hibernate Search shuts down cleanly
Summary: Ensure that Hibernate Search shuts down cleanly
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic
Version: development
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.0
Assignee: Sean Flanigan
QA Contact: Ding-Yi Chen
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-06 03:20 UTC by Sean Flanigan
Modified: 2015-07-20 07:33 UTC (History)
1 user (show)

Fixed In Version: 1.7.2-SNAPSHOT (20120820-0007)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-11-07 06:19:16 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1244612 0 unspecified CLOSED Zanata sometimes leaves Hibernate Search .lock files in the index directory after shutdown 2021-02-22 00:41:40 UTC

Internal Links: 1244612

Description Sean Flanigan 2012-08-06 03:20:17 UTC
The app server sometimes refuses to shut down cleanly.  I suspect this prevents Hibernate Search/Lucene from closing the index files cleanly, thus leading to some of our TM problems (eg missing results, or reindex has no effect).  We need to make sure Zanata always closes indexes properly.

Comment 1 Sean Flanigan 2012-08-08 02:17:07 UTC
Implemented a shutdown hook which prevents GWTEventService servlet from blocking shutdown for five minutes.  This should enable a clean shutdown.

In release (1.6-SNAPSHOT):
https://github.com/zanata/zanata/commit/4fe87b3430487ad55ba74fa643810e414819a310

In integration/master:
https://github.com/zanata/zanata/commit/4fe87b3430487ad55ba74fa643810e414819a310

I tried to implement another shutdown hook (a fail-safe which would close the EntityManagerFactory after 20 seconds), but Seam shuts down before it fires.  I think we just have to be careful to shut down Zanata cleanly, and if we are forced to use kill -9, we should delete the index directory before restarting.

Comment 2 Sean Flanigan 2012-08-08 02:18:23 UTC
Oh, those two links are the same because it's actually the one commit, which was merged from release into integration/master.

Comment 3 Ding-Yi Chen 2012-08-20 04:24:45 UTC
VERIFIED with Zanata version 1.7.2-SNAPSHOT (20120820-0007)

Will continue to verify 1.8 after the reindex is completed.

Comment 4 Ding-Yi Chen 2012-08-23 01:31:07 UTC
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20120823-0015)

Comment 5 Sean Flanigan 2012-11-07 06:19:16 UTC
Fix released in Zanata 2.0.


Note You need to log in before you can comment on or make changes to this bug.