Fix OPENDJ-462: Spinning threads in JE backend importer
Use Queue.take() instead of Queue.poll(). Thanks to Radiant Logic for spotting this.
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public Void call() throws IOException |
| | | public Void call() throws IOException, InterruptedException |
| | | { |
| | | long offset = 0; |
| | | List<IndexOutputBuffer> l = new LinkedList<IndexOutputBuffer>(); |
| | | try { |
| | | while(true) |
| | | { |
| | | IndexOutputBuffer indexBuffer = queue.poll(); |
| | | if(indexBuffer != null) |
| | | { |
| | | final IndexOutputBuffer indexBuffer = queue.take(); |
| | | long beginOffset = offset; |
| | | long bufferLen; |
| | | if(!queue.isEmpty()) |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | Message message = ERR_JEB_IMPORT_LDIF_INDEX_FILEWRITER_ERR.get(indexMgr |