mirror of https://github.com/apache/lucene.git
SOLR-14058: fix peersync bounds check iterating over versions
This commit is contained in:
parent
9a4f7661e9
commit
c3e44e1fec
|
@ -153,6 +153,9 @@ Bug Fixes
|
||||||
|
|
||||||
* SOLR-14038: Admin UI display for "state.json" should be in a scollable region (Kevin Risden)
|
* SOLR-14038: Admin UI display for "state.json" should be in a scollable region (Kevin Risden)
|
||||||
|
|
||||||
|
* SOLR-14058: Fix IndexOutOfBoundsException in PeerSync that can prevent nodes from recovering
|
||||||
|
under certain circumstances. (yonik)
|
||||||
|
|
||||||
Other Changes
|
Other Changes
|
||||||
---------------------
|
---------------------
|
||||||
|
|
||||||
|
|
|
@ -753,7 +753,7 @@ public class PeerSync implements SolrMetricProducer {
|
||||||
ourUpdatesIndex--;
|
ourUpdatesIndex--;
|
||||||
} else {
|
} else {
|
||||||
long rangeStart = otherVersions.get(otherUpdatesIndex);
|
long rangeStart = otherVersions.get(otherUpdatesIndex);
|
||||||
while ((otherUpdatesIndex < otherVersions.size())
|
while (otherUpdatesIndex >= 0
|
||||||
&& (Math.abs(otherVersions.get(otherUpdatesIndex)) < Math.abs(ourUpdates.get(ourUpdatesIndex)))) {
|
&& (Math.abs(otherVersions.get(otherUpdatesIndex)) < Math.abs(ourUpdates.get(ourUpdatesIndex)))) {
|
||||||
otherUpdatesIndex--;
|
otherUpdatesIndex--;
|
||||||
totalRequestedVersions++;
|
totalRequestedVersions++;
|
||||||
|
|
Loading…
Reference in New Issue