Bug 845896 - Ensure that Hibernate Search shuts down cleanly
Ensure that Hibernate Search shuts down cleanly
Status: CLOSED CURRENTRELEASE
Product: Zanata
Classification: Community
Component: Component-Logic (Show other bugs)
development
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.0
Assigned To: Sean Flanigan
Ding-Yi Chen
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-05 23:20 EDT by Sean Flanigan
Modified: 2015-07-20 03:33 EDT (History)
1 user (show)

See Also:
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 01:19:16 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Sean Flanigan 2012-08-05 23:20:17 EDT
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-07 22:17:07 EDT
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-07 22:18:23 EDT
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 00:24:45 EDT
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-22 21:31:07 EDT
VERIFIED with Zanata version 1.8.0-SNAPSHOT (20120823-0015)
Comment 5 Sean Flanigan 2012-11-07 01:19:16 EST
Fix released in Zanata 2.0.

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