Bug 1244612 - Zanata sometimes leaves Hibernate Search .lock files in the index directory after shutdown
Summary: Zanata sometimes leaves Hibernate Search .lock files in the index directory a...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Zanata
Classification: Retired
Component: Component-Logic, Deployment
Version: 3.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Sean Flanigan
QA Contact: Zanata-QA Mailling List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-20 07:20 UTC by Sean Flanigan
Modified: 2016-08-04 00:27 UTC (History)
2 users (show)

Fixed In Version: 3.8.0-SNAPSHOT (git-server-3.6.2-600-gb34e317)
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-08-04 00:27:46 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 845896 0 unspecified CLOSED Ensure that Hibernate Search shuts down cleanly 2021-02-22 00:41:40 UTC
Red Hat Bugzilla 1125472 0 unspecified CLOSED Ops: Revisit Hibernate Search lock detection 2021-02-22 00:41:40 UTC

Internal Links: 845896 1125472

Description Sean Flanigan 2015-07-20 07:20:17 UTC
Description of problem:
Sometimes when stopping the jbossas service, one or more .lock files are left under /var/lib/zanata/index.  When this happens, the Lucene indexes *may* be left in an inconsistent state.  If so, I think it could cause problems with search results, unless the indexes are deleted (I haven't found any documentation which says either way).

We should ensure that the Hibernate Search SessionFactory is shut down cleanly, by registering a shutdown listener to call close on the SessionFactory.

Version-Release number of selected component (if applicable):
3.6.2

How reproducible:
Rare, probably depends on load

Steps to Reproduce:
1. Install jbossas and zanata from rpms
2. Stop jbossas, preferably while changes are happening.
3. Check under /var/lib/zanata/index for .lock files

Actual results:
Sometimes there are leftover .lock files, which indicates that Hibernate Search did not shut down cleanly.

Expected results:
No .lock files.

Additional info:
See https://bugzilla.redhat.com/show_bug.cgi?id=1125472 and https://bugzilla.redhat.com/show_bug.cgi?id=1125472

Comment 1 Sean Flanigan 2015-07-20 07:33:42 UTC
(One of the "see also"s in the bug description was meant to be bug 845896.)

Pull request: https://github.com/zanata/zanata-server/pull/920

Comment 2 Damian Jansen 2015-07-29 02:23:52 UTC
Verified at d11a347477028904c5fb3d7541b0099098ffaf02


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