Interesting! I haven't come across this one myself.
By Phoenix 4.7, am I to assume you mean 4.7.0? Phoenix version strings
are 3 "digits", not 2.
My first guess would be that it might be a race condition around the
closeStatement call (either from multiple callers) or the
automatic-closing logic inside of PQS itself (by default, PQS will close
statements that haven't been used for 10mins, IIRC).
Any more information on the context in which you see this would be very
helpful.
Tulasi Paradarami wrote:
We noticed that PQS started raising ArrayIndexOutOfBoundsException in
our production cluster. This exception is raised sporadically and goes
away when PQS is restarted. Does anyone know what might be causing this
exception? Are there any configuration (PQS and/or Avatica) parameters
that we can modify to prevent it from recurring?
CDH 5.7.2
HBase: 1.2.0
Phoenix: 4.7
Here is an error stack for "closeStatement" request:
{"level":"TRACE","message":" server.AvaticaJsonHandler: response:
Response:
{"response":"error","exceptions":["java.lang.ArrayIndexOutOfBoundsException:
-1
at java.util.ArrayList.fastRemove(ArrayList.java:528)
at java.util.ArrayList.remove(ArrayList.java:511)
at org.apache.phoenix.jdbc.PhoenixResultSet.close(PhoenixResultSet.java:165)
at
org.apache.calcite.avatica.jdbc.JdbcMeta.closeStatement(JdbcMeta.java:559)
at
org.apache.calcite.avatica.remote.LocalService.apply(LocalService.java:256)
at
org.apache.calcite.avatica.remote.Service$CloseStatementRequest.accept(Service.java:1529)
at
org.apache.calcite.avatica.remote.Service$CloseStatementRequest.accept(Service.java:1511)
at
org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:102)
at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:43)
at
org.apache.calcite.avatica.server.AvaticaJsonHandler.handle(AvaticaJsonHandler.java:73)
at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:497)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:245)
at org.eclipse.jetty.io
<http://org.eclipse.jetty.io>.AbstractConnection$2.run(AbstractConnection.java:540)
at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Thread.java:745)
"],"errorMessage":"ArrayIndexOutOfBoundsException:
-1","errorCode":-1,"sqlState":"00000","severity":"UNKNOWN","rpcMetadata":{"response":"rpcMetadata","serverAddress":"pqs_hostname:8765"}},
Status:500"}