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

Connection properties are lost after timeout

Details

    Description

      When use avatica connect Phoenix QueryServer, I create an AvaticaConnection:

      Connection conntion = DriverManage.getConnection(url);
      connection.setAutoCommit(true);
      

      Avatica keep PhoenixConnection alive in the Cache, which will be expired after 10min by default.
      I still use the older AvaticaConnection , it will reopen an PhoenixConnection, but the ConnectionProperties is loss, such as AutoCommit.

      I use sqlline-thin.py to reappear the problem:
      1) sqlline-thin.py http://localhost:8765
      2) upsert one row and select

      3) after 10 min, upsert again, the connection will be recreate, but select null

      link title

      Attachments

        1. image-2019-02-28-17-28-31-926.png
          417 kB
          shining
        2. image-2019-02-28-17-25-39-478.png
          88 kB
          shining

        Issue Links

          Activity

            julianhyde Julian Hyde added a comment -

            I'm skeptical that this is an Avatica problem (however I'm prepared to be convinced).

            julianhyde Julian Hyde added a comment - I'm skeptical that this is an Avatica problem (however I'm prepared to be convinced).
            shining shining added a comment -

            when reopen the connecion, ConnectionProperties In the Meta already set dirty false, therefore the parameters such as autocommit cannot be synchronized to PhoenixConnection.

            shining shining added a comment - when reopen the connecion, ConnectionProperties In the Meta already set dirty false, therefore the parameters such as autocommit cannot be synchronized to PhoenixConnection.
            shining shining added a comment -

            julianhyde Could you help to review it?

            shining shining added a comment - julianhyde Could you help to review it?
            francischuang Francis Chuang added a comment - - edited

            shining There are a few comments on your PR. Can you please have a look and address them? We are planning to make Avatica 1.14.0 available for voting soon, and I'd like to include this PR if possible.

            francischuang Francis Chuang added a comment - - edited shining There are a few comments on your PR. Can you please have a look and address them? We are planning to make Avatica 1.14.0 available for voting soon, and I'd like to include this PR if possible.
            shining shining added a comment -

            francischuang Thanks for your reply, I add test for this problem and comment on PR.

            shining shining added a comment - francischuang Thanks for your reply, I add test for this problem and comment on PR.
            zabetak Stamatis Zampetakis added a comment - Fixed in f3997b54a743dd10153163961229d72d298902bd .

            Thanks for the PR shining! I did some refactoring and committed

            zabetak Stamatis Zampetakis added a comment - Thanks for the PR shining ! I did some refactoring and committed
            francischuang Francis Chuang added a comment -

            Resolved in release avatica-1.14.0 (2019-04-29)

            francischuang Francis Chuang added a comment - Resolved in release avatica-1.14.0 (2019-04-29)

            People

              Unassigned Unassigned
              shining shining
              Votes:
              0 Vote for this issue
              Watchers:
              4 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 - 2h 50m
                  2h 50m