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
|
||||
public Cell current() {
|
||||
if (cells == null
|
||||
if (isEmpty()
|
||||
|| cellScannerIndex == INITIAL_CELLSCANNER_INDEX
|
||||
|| cellScannerIndex >= cells.length)
|
||||
|| cellScannerIndex >= cells.length) {
|
||||
return null;
|
||||
}
|
||||
return this.cells[cellScannerIndex];
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean advance() {
|
||||
if (cells == null) return false;
|
||||
if (isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
cellScannerIndex++;
|
||||
if (cellScannerIndex < this.cells.length) {
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue