Description
PagedRegionScanner is throwing NPE if pagedFilter is not initialized. See the stack trace below. We are running some version of phoenix 4.16 in conjunction with hbase-1.6. But the problem exists in all phoenix versions.
[2022:05:03 12:11:50.306] [<class name>] [INFO ] [o.a.p.iterate.BaseResultIterators] - Failed to execute task during cancel java.util.concurrent.ExecutionException: org.apache.phoenix.exception.PhoenixIOException: org.apache.hadoop.hbase.DoNotRetryIOException: <table-name>: null at org.apache.phoenix.util.ServerUtil.createIOException(ServerUtil.java:122) at org.apache.phoenix.util.ServerUtil.throwIOException(ServerUtil.java:88) at org.apache.phoenix.iterate.RegionScannerFactory$1.nextRaw(RegionScannerFactory.java:230) at org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:82) at org.apache.phoenix.coprocessor.DelegateRegionScanner.nextRaw(DelegateRegionScanner.java:82) at org.apache.phoenix.coprocessor.BaseScannerRegionObserver$RegionScannerHolder.nextRaw(BaseScannerRegionObserver.java:340) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:2963) at org.apache.hadoop.hbase.regionserver.RSRpcServices.scan(RSRpcServices.java:3212) at org.apache.hadoop.hbase.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:36804) at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:2432) at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:124) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:311) at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:291) Caused by: java.lang.NullPointerException at org.apache.phoenix.coprocessor.PagedRegionScanner.next(PagedRegionScanner.java:85) at org.apache.phoenix.coprocessor.PagedRegionScanner.nextRaw(PagedRegionScanner.java:97) at org.apache.phoenix.iterate.RegionScannerFactory$1.nextRaw(RegionScannerFactory.java:184) ... 10 more
This scan doesn't use PageFilter but encountered some Exception.
In the catch block, we don't check whether pagedFilter is initialized or not.
private boolean next(List<Cell> results, boolean raw) throws IOException { try { boolean hasMore = raw ? delegate.nextRaw(results) : delegate.next(results); if (pageFilter == null) { return hasMore; } .... .... } catch (Exception e) { pageFilter.init(); --------> pageFilter is not initialized. throw e; } }
Attachments
Issue Links
- links to