Skip to content

Commit

Permalink
HBASE-26688 Threads shared EMPTY_RESULT may lead to unexpected client…
Browse files Browse the repository at this point in the history
… job down. (#4048)

Signed-off-by: Duo Zhang <[email protected]>
  • Loading branch information
YutSean authored Jan 25, 2022
1 parent 2be3958 commit d77ede4
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -913,16 +913,19 @@ public CellScanner 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;
Expand Down

0 comments on commit d77ede4

Please sign in to comment.