Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jbtm 3015 #1306

Merged
merged 1 commit into from
Apr 25, 2018
Merged

Jbtm 3015 #1306

merged 1 commit into from
Apr 25, 2018

Conversation

tomjenkinson
Copy link
Member

https://issues.jboss.org/browse/JBTM-3015

!RTS !QA_JTS_OPENJDKORB !AS_TESTS !QA_JTA !QA_JTS_JACORB !BLACKTIE !QA_JTS_JDKORB !XTS NO_WIN !MAIN !PERF

@tomjenkinson
Copy link
Member Author

@Karm this patch seemed to fix it locally for me

@jbosstm-bot
Copy link

@Karm
Copy link
Contributor

Karm commented Apr 24, 2018

@tomjenkinson, it does not help 😞
I can see in the log:

24-Apr-2018 18:37:00.986 WARNING [http-nio-8080-exec-3] org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.setPoolConfig There was an error processing pool config properties.
 java.lang.NoSuchFieldException: maxWaitMillis
      at java.lang.Class.getDeclaredField(Class.java:2070)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getSetMethod(TransactionalDataSourceFactory.java:226)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.setPoolConfig(TransactionalDataSourceFactory.java:204)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getObjectInstance(TransactionalDataSourceFactory.java:117)
      <SNAP>

24-Apr-2018 18:37:00.988 WARNING [http-nio-8080-exec-3] org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.setPoolConfig There was an error processing pool config properties.
 java.lang.NoSuchFieldException: testOnBorrow
      at java.lang.Class.getDeclaredField(Class.java:2070)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getSetMethod(TransactionalDataSourceFactory.java:226)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.setPoolConfig(TransactionalDataSourceFactory.java:204)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getObjectInstance(TransactionalDataSourceFactory.java:117)
      <SNAP>

24-Apr-2018 18:37:00.991 WARNING [http-nio-8080-exec-3] org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.setPoolConfig There was an error processing pool config properties.
 java.lang.NoSuchFieldException: jmxEnabled
      at java.lang.Class.getDeclaredField(Class.java:2070)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getSetMethod(TransactionalDataSourceFactory.java:226)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.setPoolConfig(TransactionalDataSourceFactory.java:204)
      at org.jboss.narayana.tomcat.jta.TransactionalDataSourceFactory.getObjectInstance(TransactionalDataSourceFactory.java:117)
      <SNAP>

Despite those being legit props IIUC: GenericObjectPool.java#L462

With your patch applied, I keep seeing endless DB trace:

2018-04-24 16:46:09.859 UTC transaction_id: 0 LOG:  execute <unnamed>: SELECT gid FROM pg_prepared_xacts where database = current_database()

And Tomcat's:

24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run PeriodicRecovery: background thread Status <== SCANNING
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run PeriodicRecovery: background thread scanning
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal Periodic recovery first pass at Tue, 24 Apr 2018 18:47:41
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule.periodicWorkFirstPass AtomicActionRecoveryModule first pass
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule.processTransactions processing /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction transactions
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal  
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState XARecoveryModule state change IDLE->FIRST_PASS

24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass Local XARecoveryModule - first pass
24-Apr-2018 18:47:41.935 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass xarecovery of org.postgresql.xa.PGXAConnection@5f3ec7c3
24-Apr-2018 18:47:41.936 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass Found 0 xids in doubt
24-Apr-2018 18:47:41.936 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass xarecovery of org.jboss.narayana.tomcat.jta.integration.app.TestXAResource@55d171e3
24-Apr-2018 18:47:41.936 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass Found 0 xids in doubt
24-Apr-2018 18:47:41.937 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState XARecoveryModule state change FIRST_PASS->BETWEEN_PASSES

24-Apr-2018 18:47:41.937 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal  




24-Apr-2018 18:47:43.937 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal Periodic recovery second pass at Tue, 24 Apr 2018 18:47:43
24-Apr-2018 18:47:43.937 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule.periodicWorkSecondPass AtomicActionRecoveryModule second pass
24-Apr-2018 18:47:43.937 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal  
24-Apr-2018 18:47:43.937 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState XARecoveryModule state change BETWEEN_PASSES->SECOND_PASS

24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass Local XARecoveryModule - second pass
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass Local XARecoveryModule.transactionInitiatedRecovery completed
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass xarecovery second pass of org.postgresql.xa.PGXAConnection@5f3ec7c3
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass Have 0 Xids to recover on this pass.
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass xarecovery second pass of org.jboss.narayana.tomcat.jta.integration.app.TestXAResource@55d171e3
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoverySecondPass Have 0 Xids to recover on this pass.
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkSecondPass Local XARecoveryModule.resourceInitiatedRecovery completed
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState XARecoveryModule state change SECOND_PASS->IDLE

24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal  
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run PeriodicRecovery: background thread Status <== INACTIVE
24-Apr-2018 18:47:43.938 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run PeriodicRecovery: background thread backing off





24-Apr-2018 18:47:45.939 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run PeriodicRecovery: background thread Status <== SCANNING
24-Apr-2018 18:47:45.939 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run PeriodicRecovery: background thread scanning
24-Apr-2018 18:47:45.939 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal Periodic recovery first pass at Tue, 24 Apr 2018 18:47:45
24-Apr-2018 18:47:45.939 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule.periodicWorkFirstPass AtomicActionRecoveryModule first pass
24-Apr-2018 18:47:45.939 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule.processTransactions processing /StateManager/BasicAction/TwoPhaseCoordinator/AtomicAction transactions
24-Apr-2018 18:47:45.939 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal  
24-Apr-2018 18:47:45.940 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState XARecoveryModule state change IDLE->FIRST_PASS

24-Apr-2018 18:47:45.940 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass Local XARecoveryModule - first pass
24-Apr-2018 18:47:45.940 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass xarecovery of org.postgresql.xa.PGXAConnection@5f3ec7c3
24-Apr-2018 18:47:45.942 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass Found 0 xids in doubt
24-Apr-2018 18:47:45.942 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass xarecovery of org.jboss.narayana.tomcat.jta.integration.app.TestXAResource@55d171e3
24-Apr-2018 18:47:45.942 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.xaRecoveryFirstPass Found 0 xids in doubt
24-Apr-2018 18:47:45.942 DEBUG [Periodic Recovery] com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.setScanState XARecoveryModule state change FIRST_PASS->BETWEEN_PASSES

24-Apr-2018 18:47:45.942 DEBUG [Periodic Recovery] com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal  

Isn't there something missing in the PR?

Config change:

-             tsDbSource.setAttribute("maxTotal", "4");
+            tsDbSource.setAttribute("maxTotal", "20");
....
-         IntStream.range(0, 3).forEach(i -> test(EXECUTOR_URL + RECOVERY_TEST));
+        IntStream.range(0, 10).forEach(i -> test(EXECUTOR_URL + RECOVERY_TEST));

@tomjenkinson
Copy link
Member Author

Weird that I did not see it here. I will take a further look

@jbosstm-bot
Copy link

@zhfeng
Copy link
Collaborator

zhfeng commented Apr 25, 2018

Thanks @tomjenkinson , and it looks good to me.
@Karm In the term of the "NoSuchFieldException", I think there are only "maxTotal", "maxIdle" and "minIdle" in the GenericObjectPoolConfig, the others are in its parent class BaseObjectPoolConfig. I will create another JIRA for fixing.

And there is an issue in the TestExecutor.writeToTheDatabase() which should close the connection at the end. I will open the other PR #1307 for fixing this issue.

@jbosstm-bot
Copy link

BLACKTIE profile tests failed on Linux (https://ci-master-jenkins-csb-narayana.cloud.paas.psi.redhat.com/job/btny-pulls-narayana/PROFILE=BLACKTIE,jdk=jdk8.latest,label=swarm/588/): Narayana rebase on master failed. Please rebase it manually

@jbosstm-bot
Copy link

MAIN profile tests failed (https://ci-master-jenkins-csb-narayana.cloud.paas.psi.redhat.com/job/btny-pulls-narayana/PROFILE=MAIN,jdk=jdk8.latest,label=swarm/588/): Narayana rebase on master failed. Please rebase it manually

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants