server: fix orphan db transaction issue#11095
Conversation
Fixes apache#11058 Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.20 #11095 +/- ##
=========================================
Coverage 16.15% 16.15%
- Complexity 13277 13278 +1
=========================================
Files 5657 5657
Lines 497939 497948 +9
Branches 60386 60386
=========================================
+ Hits 80443 80464 +21
+ Misses 408532 408521 -11
+ Partials 8964 8963 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
vishesh92
left a comment
There was a problem hiding this comment.
clgtm. tested locally. I no longer see the orphaned transaction errors.
|
@blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13939 |
|
@blueorangutan test |
|
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13623)
|
|
I don’t think the iso error is related, invesitgating, and also to verify the absence of the orphaned connection messages; |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13634)
|
|
checked on both MSses of a lab env and the message no longer occurs with this change. |
|
@shwstppr are you satisfied like this or due you want to work on this some more? |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
|
@DaanHoogland I've updated two more similar code blocks. Will run another round of tests and mark it ready. @blueorangutan package |
|
@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 13973 |
|
@blueorangutan test |
|
@shwstppr a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-13657)
|
|
previous version tested, and smoke tests pass, merging |
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
| @Override | ||
| public void doInTransactionWithoutResult(TransactionStatus status) { | ||
| final HostVO host = hostDao.findById(hostId); | ||
| _capacityMgr.updateCapacityForHost(host); |
There was a problem hiding this comment.
@shwstppr
I noticed an exception in the management-server.log which seems to be related to this change
2025-09-10 15:22:10,998 ERROR [o.a.c.f.m.MessageBusBase] (pool-18-thread-1:[]) (logid:) NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION! com.cloud.utils.exception.CloudRuntimeException: NO EVENT PUBLISH CAN BE WRAPPED WITHIN DB TRANSACTION!
at org.apache.cloudstack.framework.messagebus.MessageBusBase.publish(MessageBusBase.java:168)
at com.cloud.capacity.CapacityManagerImpl.updateCapacityForHost(CapacityManagerImpl.java:774)
at com.cloud.alert.AlertManagerImpl$1.doInTransactionWithoutResult(AlertManagerImpl.java:301)
at com.cloud.utils.db.TransactionCallbackNoReturn.doInTransaction(TransactionCallbackNoReturn.java:25)
at com.cloud.utils.db.Transaction$2.doInTransaction(Transaction.java:48)
at com.cloud.utils.db.Transaction.execute(Transaction.java:38)
at com.cloud.utils.db.Transaction.execute(Transaction.java:45)
at com.cloud.alert.AlertManagerImpl.lambda$recalculateHostCapacities$0(AlertManagerImpl.java:297)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:840)
There was a problem hiding this comment.
@weizhouapache I'm not seeing this in a few of my test environments. Any reproduction steps?
Description
Fixes #11058
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?