You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Haisheng Yuan (Jira)" <ji...@apache.org> on 2020/04/14 13:45:00 UTC

[jira] [Resolved] (CALCITE-3324) Infinite loop when calling DDL from remote Avatica driver to LocalService wrapping CalciteMetaImpl

     [ https://issues.apache.org/jira/browse/CALCITE-3324?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Haisheng Yuan resolved CALCITE-3324.
------------------------------------
    Fix Version/s: 1.23.0
       Resolution: Fixed

Fixed in https://github.com/apache/calcite/commit/f1857aa305c99dca40ee3c940ee689d77f27eaee. Thanks for the PR, [~rayokota]!

> Infinite loop when calling DDL from remote Avatica driver to LocalService wrapping CalciteMetaImpl
> --------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3324
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3324
>             Project: Calcite
>          Issue Type: Bug
>          Components: avatica, core
>    Affects Versions: 1.20.0
>            Reporter: Robert Yokota
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.23.0, avatica-1.16.0
>
>          Time Spent: 2.5h
>  Remaining Estimate: 0h
>
> I encountered an infinite loop when submitting DDL from a remote Avatica driver (using sqlline) against a {{LocalService}} wrapping {{CalciteMetaImpl}}.
> I was able to debug the issue and verified a fix.
> The problem was that in {{CalciteMetaImpl.prepareAndExecute}}, the updateCount is not being passed to the {{MetaResultSet}} constructor.  Instead, the updateCount is always set to -1.  This incorrectly instructs the remote Avatica driver to fetch results when there aren't any, which causes it to loop.
> By fixing the {{CalciteMetaImpl.prepareAndExecute}} method to set the updateCount in {{MetaResultSet}}, I was able to fix the infinite loop.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)