Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3324

Infinite loop when calling DDL from remote Avatica driver to LocalService wrapping CalciteMetaImpl

    XMLWordPrintableJSON

    Details

      Description

      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.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              rayokota Robert Yokota
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2.5h
                2.5h