HBASE-26688 Threads shared EMPTY_RESULT may lead to unexpected client job down. (#4048)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
This commit is contained in:
parent
4aa31ce0cd
commit
0771c04a32
|
@ -913,16 +913,19 @@ public class Result implements CellScannable, CellScanner {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Cell current() {
|
public Cell current() {
|
||||||
if (cells == null
|
if (isEmpty()
|
||||||
|| cellScannerIndex == INITIAL_CELLSCANNER_INDEX
|
|| cellScannerIndex == INITIAL_CELLSCANNER_INDEX
|
||||||
|| cellScannerIndex >= cells.length)
|
|| cellScannerIndex >= cells.length) {
|
||||||
return null;
|
return null;
|
||||||
|
}
|
||||||
return this.cells[cellScannerIndex];
|
return this.cells[cellScannerIndex];
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean advance() {
|
public boolean advance() {
|
||||||
if (cells == null) return false;
|
if (isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
cellScannerIndex++;
|
cellScannerIndex++;
|
||||||
if (cellScannerIndex < this.cells.length) {
|
if (cellScannerIndex < this.cells.length) {
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue