Uploaded image for project: 'controller'
  1. controller
  2. CONTROLLER-2021

Shard does not disable tracking on ReadyLocalTransaction

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Medium
    • Resolution: Done
    • None
    • 3.0.13, 4.0.7, 2.0.10
    • clustering
    • None

    Description

      This was uncovered during CONTROLLER-1991 development: encountering a ReadyLocalTransaction does not result in state tracking getting disabled as it should, leading to assertion failure:

      [ERROR] testSingleTransactionsWritesInQuickSuccession[class org.opendaylight.controller.cluster.datastore.TestDistributedDataStore](org.opendaylight.controller.cluster.datastore.DistributedDataStoreIntegrationTest)  Time elapsed: 12.098 s  <<< ERROR!
      org.awaitility.core.ConditionTimeoutException: Condition with alias 'transaction state propagation' didn't complete within 5 seconds because assertion condition defined as a lambda expression in org.opendaylight.controller.cluster.datastore.AbstractDistributedDataStoreIntegrationTest that uses org.opendaylight.controller.cluster.datastore.AbstractDataStore expected:<[]> but was:<[FrontendHistoryMetadata{historyId=1, cookie=0, closed=false, closedTransactions={0=true, 1=true, 3=true, 5=true, 7=true, 9=true}, purgedTransactions=ImmutableUnsignedLongSet{size=0}}, FrontendHistoryMetadata{historyId=0, cookie=0, closed=false, closedTransactions={}, purgedTransactions=ImmutableUnsignedLongSet{size=0}}]>.
              at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:166)
              at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
              at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
              at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:939)
              at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:723)
              at org.opendaylight.controller.cluster.datastore.AbstractDistributedDataStoreIntegrationTest.testSingleTransactionsWritesInQuickSuccession(AbstractDistributedDataStoreIntegrationTest.java:282)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:566)
              at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
              at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
              at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
              at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
              at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
              at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
              at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
              at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
              at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
              at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
              at org.junit.runners.Suite.runChild(Suite.java:128)
              at org.junit.runners.Suite.runChild(Suite.java:27)
              at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
              at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
              at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
              at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
              at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
              at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
              at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
              at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:365)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeWithRerun(JUnit4Provider.java:273)
              at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:238)
              at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:159)
              at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:384)
              at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:345)
              at org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:126)
              at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:418)
      Caused by: java.lang.AssertionError: expected:<[]> but was:<[FrontendHistoryMetadata{historyId=1, cookie=0, closed=false, closedTransactions={0=true, 1=true, 3=true, 5=true, 7=true, 9=true}, purgedTransactions=ImmutableUnsignedLongSet{size=0}}, FrontendHistoryMetadata{historyId=0, cookie=0, closed=false, closedTransactions={}, purgedTransactions=ImmutableUnsignedLongSet{size=0}}]>
              at org.junit.Assert.fail(Assert.java:89)
              at org.junit.Assert.failNotEquals(Assert.java:835)
              at org.junit.Assert.assertEquals(Assert.java:120)
              at org.junit.Assert.assertEquals(Assert.java:146)
              at org.opendaylight.controller.cluster.datastore.AbstractDistributedDataStoreIntegrationTest.assertAskMetadata(AbstractDistributedDataStoreIntegrationTest.java:308)
              at org.opendaylight.controller.cluster.datastore.AbstractDistributedDataStoreIntegrationTest.lambda$testSingleTransactionsWritesInQuickSuccession$0(AbstractDistributedDataStoreIntegrationTest.java:293)
              at org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
              at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:234)
              at org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:221)
              at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
              at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
              at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
              at java.base/java.lang.Thread.run(Thread.java:829)
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            rovarga Robert Varga
            rovarga Robert Varga
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: