Fixed
Details
Assignee
Yoann RodièreYoann RodièreReporter
Yoann RodièreYoann RodièreComponents
Fix versions
Priority
Major
Details
Details
Assignee
Yoann Rodière
Yoann RodièreReporter
Yoann Rodière
Yoann RodièreComponents
Fix versions
Priority
Created June 8, 2017 at 5:45 PM
Updated June 13, 2017 at 10:38 AM
Resolved June 8, 2017 at 9:44 PM
Following HSEARCH-2652, we have this code:
SequentialWorkExecutionContext context = new SequentialWorkExecutionContext( client, gsonProvider, workFactory, ElasticsearchWorkProcessor.this, errorHandler ); synchronized ( asyncProcessor ) { while ( true ) { Iterable<Iterable<ElasticsearchWork<?>>> works = asyncProcessor.asyncWorkQueue.drainToDetachedIterable(); if ( works == null ) { // Allow other async processors to be setup already as we're on our way to termination: asyncProcessor.asyncWorkerWasStarted.set( false ); // Nothing more to do, flush and terminate: context.flush(); return; } Iterable<ElasticsearchWork<?>> flattenedWorks = CollectionHelper.flatten( works ); executeSafe( flattenedWorks, false ); }
context
is not used anywhere, there's something wrong. It should be used inexecuteSafe
.