@@ -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 /**
0 commit comments