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

Deactivation hangs if an open transaction exists

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.7
    • mvcc
    • None

    Description

      1. Start 2 node with PDS
      2. Activate cluster
      3. Connect sqlline
      4. Create table create table t1(a int, b varchar, primary key(a)) with "ATOMICITY=TRANSACTIONAL_SNAPSHOT,backups=1";
      3.Start TX and execute a DML commnd:

      begin;
      insert into t1 values (1, '1');
      

      4. Try deactivate cluster bin/control.bat --deactivate. The scripts doesn't return control.
      5. Show LRT:

      c:\Work\apache-ignite-2.7.0-SNAPSHOT-bin>bin\control.bat --tx
      Control utility [ver. 2.7.0-SNAPSHOT#19700101-sha1:DEV]
      2018 Copyright(C) Apache Software Foundation
      User: 
      --------------------------------------------------------------------------------
      Matching transactions:
      TcpDiscoveryNode [id=5d3e8936-174d-42e2-a47f-c70ec02bccab, addrs=[127.0.0.1], order=1, ver=2.7.0#19700101-sha1:00000000,
       isClient=false, consistentId=1]
          Tx: [xid=74bc1aba661-00000000-090e-b121-0000-000000000001, label=null, state=ACTIVE, startTime=2018-10-25 17:34:35.5
      22, duration=352, isolation=REPEATABLE_READ, concurrency=PESSIMISTIC, topVer=AffinityTopologyVersion [topVer=2, minorTop
      Ver=6], timeout=0, size=0, dhtNodes=[41ff88d2], nearXid=74bc1aba661-00000000-090e-b121-0000-000000000001, parentNodeIds=
      [5d3e8936]]
      

      6. Complete TX:

      0: jdbc:ignite:thin://127.0.0.1/> commit;
      Error: class org.apache.ignite.IgniteException: Can not perform the operation because the cluster is inactive. Note, tha
      t the cluster is considered inactive by default if Ignite Persistent Store is used to let all the nodes join the cluster
      . To activate the cluster call Ignite.active(true). (state=50000,code=1)
      java.sql.SQLException: class org.apache.ignite.IgniteException: Can not perform the operation because the cluster is ina
      ctive. Note, that the cluster is considered inactive by default if Ignite Persistent Store is used to let all the nodes
      join the cluster. To activate the cluster call Ignite.active(true).
              at org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
              at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
              at org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
              at sqlline.Commands.execute(Commands.java:823)
              at sqlline.Commands.sql(Commands.java:733)
              at sqlline.SqlLine.dispatch(SqlLine.java:795)
              at sqlline.SqlLine.begin(SqlLine.java:668)
              at sqlline.SqlLine.start(SqlLine.java:373)
              at sqlline.SqlLine.main(SqlLine.java:265)
      0: jdbc:ignite:thin://127.0.0.1/>
      

      It.s ok but LRT is still presented and deactivation script doesn't return control back to user:

      c:\Work\apache-ignite-2.7.0-SNAPSHOT-bin>bin\control.bat --tx
      Control utility [ver. 2.7.0-SNAPSHOT#19700101-sha1:DEV]
      2018 Copyright(C) Apache Software Foundation
      User:
      --------------------------------------------------------------------------------
      Matching transactions:
      TcpDiscoveryNode [id=5d3e8936-174d-42e2-a47f-c70ec02bccab, addrs=[127.0.0.1], order=1, ver=2.7.0#19700101-sha1:00000000,
       isClient=false, consistentId=1]
          Tx: [xid=74bc1aba661-00000000-090e-b121-0000-000000000001, label=null, state=ACTIVE, startTime=2018-10-25 17:34:35.5
      22, duration=510, isolation=REPEATABLE_READ, concurrency=PESSIMISTIC, topVer=AffinityTopologyVersion [topVer=2, minorTop
      Ver=6], timeout=0, size=0, dhtNodes=[41ff88d2], nearXid=74bc1aba661-00000000-090e-b121-0000-000000000001, parentNodeIds=
      [5d3e8936]]
      

      Attachments

        1. stacktrace_7808.txt
          81 kB
          Sergey Kozlov
        2. stacktrace_18308.txt
          69 kB
          Sergey Kozlov
        3. PersistenceDeactivationWIthActiveMvccTransactionSelfTest.java
          6 kB
          Vladimir Ozerov

        Issue Links

          Activity

            People

              Pavlukhin Ivan Pavlukhin
              skozlov Sergey Kozlov
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: