Details
-
Bug
-
Resolution: Fixed
-
High
-
4.0 - Beta 1
-
4
-
Description
There is a bug in the DefaultIndexManager that will cause it to throw a RTE if the re-index all operation takes longer than 30 seconds.
final Index.Result result = issueIndexer.indexIssuesBatchMode(issuesIterable, context);
await(result);
await ends up calling obtain() then then this
private boolean obtain(final Awaitable waitFor) { try { if (waitFor.await(indexConfig.getIndexLockWaitTime(), TimeUnit.MILLISECONDS)) { return true; } } catch (final InterruptedException ie) { log.error("Wait attempt interrupted.", new IndexException("Wait attempt interrupted.", ie)); return false; } // We failed to acquire a lock after waiting the configured time (default=30s), so give up. final String errorMessage = "Wait attempt timed out - waited " + indexConfig.getIndexLockWaitTime() + " milliseconds"; // TODO Adding the stack trace here is kind of redundant, as you can see it in the Thread Dump anyway. log.error(errorMessage, new IndexException(errorMessage)); // Generate thread dump so that we can tell what the thread which holds the lock is doing // This should never throw an Exception ThreadDumpGenerator.generateThreadDump(); return false; }
This wont work to well with really large data sets such as JAC! The indexing will appear to have failed but in fact its still running.
Attachments
Issue Links
- is detailed by
-
JRASERVER-15548 If an attempt to get the Index lock times out, the indexing operation is discarded
- Closed