Skip to content

Commit d77ede4

Browse files
authored
HBASE-26688 Threads shared EMPTY_RESULT may lead to unexpected client job down. (#4048)
Signed-off-by: Duo Zhang <zhangduo@apache.org>
1 parent 2be3958 commit d77ede4

File tree

1 file changed

+6
-3
lines changed
  • hbase-client/src/main/java/org/apache/hadoop/hbase/client

1 file changed

+6
-3
lines changed

hbase-client/src/main/java/org/apache/hadoop/hbase/client/Result.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -913,16 +913,19 @@ public CellScanner cellScanner() {
913913

914914
@Override
915915
public Cell current() {
916-
if (cells == null
916+
if (isEmpty()
917917
|| cellScannerIndex == INITIAL_CELLSCANNER_INDEX
918-
|| cellScannerIndex >= cells.length)
918+
|| cellScannerIndex >= cells.length) {
919919
return null;
920+
}
920921
return this.cells[cellScannerIndex];
921922
}
922923

923924
@Override
924925
public boolean advance() {
925-
if (cells == null) return false;
926+
if (isEmpty()) {
927+
return false;
928+
}
926929
cellScannerIndex++;
927930
if (cellScannerIndex < this.cells.length) {
928931
return true;

0 commit comments

Comments
 (0)