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. (apache#4048)

Signed-off-by: Duo Zhang <[email protected]>
(cherry picked from commit fbd22f0)
Change-Id: I89bb6e991178b65e503988d8675eb0a19d9ee39f
  • Loading branch information
YutSean authored and Apache9 committed Jan 25, 2022
1 parent 86dcf19 commit 51005ad
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 51005ad

Please sign in to comment.