Skip to content

Commit eba9ff5

Browse files
committed
HBASE-25723 Temporarily remove the trace support for RegionScanner.next (#3119)
Signed-off-by: Viraj Jasani <[email protected]>
1 parent b2c70c0 commit eba9ff5

File tree

2 files changed

+29
-32
lines changed

2 files changed

+29
-32
lines changed

hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/RegionScannerImpl.java

Lines changed: 29 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -255,41 +255,39 @@ public boolean nextRaw(List<Cell> outResults) throws IOException {
255255

256256
@Override
257257
public boolean nextRaw(List<Cell> outResults, ScannerContext scannerContext) throws IOException {
258-
return TraceUtil.trace(() -> {
259-
if (storeHeap == null) {
260-
// scanner is closed
261-
throw new UnknownScannerException("Scanner was closed");
262-
}
263-
boolean moreValues = false;
264-
if (outResults.isEmpty()) {
265-
// Usually outResults is empty. This is true when next is called
266-
// to handle scan or get operation.
267-
moreValues = nextInternal(outResults, scannerContext);
268-
} else {
269-
List<Cell> tmpList = new ArrayList<>();
270-
moreValues = nextInternal(tmpList, scannerContext);
271-
outResults.addAll(tmpList);
272-
}
258+
if (storeHeap == null) {
259+
// scanner is closed
260+
throw new UnknownScannerException("Scanner was closed");
261+
}
262+
boolean moreValues = false;
263+
if (outResults.isEmpty()) {
264+
// Usually outResults is empty. This is true when next is called
265+
// to handle scan or get operation.
266+
moreValues = nextInternal(outResults, scannerContext);
267+
} else {
268+
List<Cell> tmpList = new ArrayList<>();
269+
moreValues = nextInternal(tmpList, scannerContext);
270+
outResults.addAll(tmpList);
271+
}
273272

274-
if (!outResults.isEmpty()) {
275-
region.addReadRequestsCount(1);
276-
if (region.getMetrics() != null) {
277-
region.getMetrics().updateReadRequestCount();
278-
}
273+
if (!outResults.isEmpty()) {
274+
region.addReadRequestsCount(1);
275+
if (region.getMetrics() != null) {
276+
region.getMetrics().updateReadRequestCount();
279277
}
278+
}
280279

281-
// If the size limit was reached it means a partial Result is being returned. Returning a
282-
// partial Result means that we should not reset the filters; filters should only be reset in
283-
// between rows
284-
if (!scannerContext.mayHaveMoreCellsInRow()) {
285-
resetFilters();
286-
}
280+
// If the size limit was reached it means a partial Result is being returned. Returning a
281+
// partial Result means that we should not reset the filters; filters should only be reset in
282+
// between rows
283+
if (!scannerContext.mayHaveMoreCellsInRow()) {
284+
resetFilters();
285+
}
287286

288-
if (isFilterDoneInternal()) {
289-
moreValues = false;
290-
}
291-
return moreValues;
292-
}, () -> region.createRegionSpan("RegionScanner.next"));
287+
if (isFilterDoneInternal()) {
288+
moreValues = false;
289+
}
290+
return moreValues;
293291
}
294292

295293
/**

hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegionTracing.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,6 @@ public void testScanner() throws IOException {
178178
}
179179
assertSpan("Region.getScanner");
180180
assertSpan("RegionScanner.reseek");
181-
assertSpan("RegionScanner.next");
182181
assertSpan("RegionScanner.close");
183182
}
184183
}

0 commit comments

Comments
 (0)