Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2837

Clarify errors when interrupted during submission of work to the ES client

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.8.0.CR1
    • Component/s: backend-elasticsearch
    • Labels:
      None

      Description

      I noticed that this interruption error is not that exceptional; essentially it might happen at any time one stops the application. Sure it might mean there's some data loss, so we should warn about this but I'd resort to a traditional WARN in the logs rather than the whole stacktrace.

      Details:
      method org.hibernate.search.elasticsearch.processor.impl.BatchingSharedElasticsearchWorkOrchestrator.submit(Iterable<ElasticsearchWork<?>>)

      Causes expceptions like:

      org.hibernate.search.exception.SearchException: Interrupted while submitting a changeset to the queue
      	at org.hibernate.search.elasticsearch.processor.impl.BatchingSharedElasticsearchWorkOrchestrator.submit(BatchingSharedElasticsearchWorkOrchestrator.java:93)
      	at org.hibernate.search.elasticsearch.impl.ElasticsearchIndexManager.performOperations(ElasticsearchIndexManager.java:449)
      	at org.hibernate.search.backend.impl.LocalBackendQueueProcessor.applyWork(LocalBackendQueueProcessor.java:58)
      	at org.hibernate.search.backend.impl.WorkQueuePerIndexSplitter.commitOperations(WorkQueuePerIndexSplitter.java:66)
      	at org.hibernate.search.backend.impl.TransactionalOperationDispatcher.dispatch(TransactionalOperationDispatcher.java:72)
      	at org.hibernate.search.backend.impl.BatchedQueueingProcessor.performWorks(BatchedQueueingProcessor.java:72)
      	at org.hibernate.search.backend.impl.PostTransactionWorkQueueSynchronization.afterCompletion(PostTransactionWorkQueueSynchronization.java:76)
      	at org.hibernate.search.testsupport.setup.TransactionContextForTest.end(TransactionContextForTest.java:45)
      	at org.hibernate.search.engineperformance.elasticsearch.NonStreamWriteJMHBenchmarks.lambda$write$3(NonStreamWriteJMHBenchmarks.java:74)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184)
      	at java.util.stream.SliceOps$1$1.accept(SliceOps.java:204)
      	at java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1812)
      	at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
      	at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:498)
      	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
      	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
      	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151)
      	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174)
      	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
      	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418)
      	at org.hibernate.search.engineperformance.elasticsearch.NonStreamWriteJMHBenchmarks.write(NonStreamWriteJMHBenchmarks.java:60)
      	at org.hibernate.search.engineperformance.elasticsearch.NonStreamWriteJMHBenchmarks.readWriteTestWriter(NonStreamWriteJMHBenchmarks.java:108)
      	at org.hibernate.search.engineperformance.elasticsearch.generated.NonStreamWriteJMHBenchmarks_concurrentReadWriteTest_jmhTest.concurrentReadWriteTest_Throughput(NonStreamWriteJMHBenchmarks_concurrentReadWriteTest_jmhTest.java:219)
      	at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:453)
      	at org.openjdk.jmh.runner.BenchmarkHandler$BenchmarkTask.call(BenchmarkHandler.java:437)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:748)
      Caused by: java.lang.InterruptedException
      	at java.util.concurrent.locks.AbstractQueuedSynchronizer.acquireInterruptibly(AbstractQueuedSynchronizer.java:1220)
      	at java.util.concurrent.locks.ReentrantLock.lockInterruptibly(ReentrantLock.java:335)
      	at java.util.concurrent.ArrayBlockingQueue.put(ArrayBlockingQueue.java:350)
      	at org.hibernate.search.elasticsearch.processor.impl.BatchingSharedElasticsearchWorkOrchestrator.submit(BatchingSharedElasticsearchWorkOrchestrator.java:89)
      
      

        Attachments

          Activity

            People

            • Assignee:
              yrodiere Yoann Rodière
              Reporter:
              sanne Sanne Grinovero
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: