Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-20855

Sql. Rework QueryTransactionWrapper to clean up the code.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • sql

    Description

      It seems we can clean up the code if we move the code from wrapTxOrStartImplicit to QueryTransactionWrapper.

      Basically the proposal is:

      • add startTxIfNeeded(QueryType) non static void method to QueryTransactionWrapper, that will be responsible for starting implicit transaction and other checks that is now reside in static wrapTxOrStartImplicit.
      • rework QueryTransactionWrapper related tests (QueryTransactionWrapperSelfTest, JdbcQueryCursorSelfTest, AsyncSqlCursorImplTest)

      This will reduce the amount and complexity of code in SqlQueryProcessor (In particular when processing a multi-statements query).

      The task was created based on a comment https://github.com/apache/ignite-3/pull/2789#discussion_r1392475145

      Attachments

        Issue Links

          Activity

            People

              xtern Pavel Pereslegin
              xtern Pavel Pereslegin
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: