mirror of https://github.com/apache/lucene.git
SOLR-11484: fixing NPE
This commit is contained in:
parent
64f60e5cec
commit
f1a6b68d75
|
@ -922,11 +922,13 @@ public class CloudSolrClient extends SolrClient {
|
||||||
// so that the next attempt would fetch the fresh state
|
// so that the next attempt would fetch the fresh state
|
||||||
// just re-read state for all of them, if it has not been retried
|
// just re-read state for all of them, if it has not been retried
|
||||||
// in retryExpiryTime time
|
// in retryExpiryTime time
|
||||||
|
if (requestedCollections != null) {
|
||||||
for (DocCollection ext : requestedCollections) {
|
for (DocCollection ext : requestedCollections) {
|
||||||
ExpiringCachedDocCollection cacheEntry = collectionStateCache.get(ext.getName());
|
ExpiringCachedDocCollection cacheEntry = collectionStateCache.get(ext.getName());
|
||||||
if (cacheEntry == null) continue;
|
if (cacheEntry == null) continue;
|
||||||
cacheEntry.maybeStale = true;
|
cacheEntry.maybeStale = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (retryCount < MAX_STALE_RETRIES) {//if it is a communication error , we must try again
|
if (retryCount < MAX_STALE_RETRIES) {//if it is a communication error , we must try again
|
||||||
//may be, we have a stale version of the collection state
|
//may be, we have a stale version of the collection state
|
||||||
// and we could not get any information from the server
|
// and we could not get any information from the server
|
||||||
|
|
Loading…
Reference in New Issue