mirror of https://github.com/apache/lucene.git
SOLR-6941: DistributedQueue#containsTaskWithRequestId can fail with NPE.
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1651380 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1696206de6
commit
423e469e5f
|
@ -435,6 +435,8 @@ Bug Fixes
|
|||
* SOLR-6923: AutoAddReplicas also consults live_nodes to see if a state change has happened.
|
||||
(Varun Thacker via Anshum Gupta)
|
||||
|
||||
* SOLR-6941: DistributedQueue#containsTaskWithRequestId can fail with NPE. (Mark Miller)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
||||
|
|
|
@ -122,10 +122,13 @@ public class DistributedQueue {
|
|||
for (String childName : childNames) {
|
||||
if (childName != null) {
|
||||
try {
|
||||
ZkNodeProps message = ZkNodeProps.load(zookeeper.getData(dir + "/" + childName, null, null, true));
|
||||
if (message.containsKey(OverseerCollectionProcessor.ASYNC)) {
|
||||
LOG.info(">>>> {}", message.get(OverseerCollectionProcessor.ASYNC));
|
||||
if(message.get(OverseerCollectionProcessor.ASYNC).equals(requestId)) return true;
|
||||
byte[] data = zookeeper.getData(dir + "/" + childName, null, null, true);
|
||||
if (data != null) {
|
||||
ZkNodeProps message = ZkNodeProps.load(data);
|
||||
if (message.containsKey(OverseerCollectionProcessor.ASYNC)) {
|
||||
LOG.debug(">>>> {}", message.get(OverseerCollectionProcessor.ASYNC));
|
||||
if(message.get(OverseerCollectionProcessor.ASYNC).equals(requestId)) return true;
|
||||
}
|
||||
}
|
||||
} catch (KeeperException.NoNodeException e) {
|
||||
// Another client removed the node first, try next
|
||||
|
|
Loading…
Reference in New Issue