Fixing the console warnings: No transaction in place, so not suspending.#1310
Conversation
./gradlew testIntegration BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d 2026-06-01 19:18:03,744 |kJoinPool-1-worker-9 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10000, maxSeqId=10010, bankSize=10 2026-06-01 19:18:03,744 |kJoinPool-1-worker-3 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,744 |kJoinPool-1-worker-3 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10010, maxSeqId=10020, bankSize=10 2026-06-01 19:18:03,745 |kJoinPool-1-worker-4 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,745 |kJoinPool-1-worker-4 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10020, maxSeqId=10030, bankSize=10 2026-06-01 19:18:03,745 |kJoinPool-1-worker-8 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,745 |kJoinPool-1-worker-8 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10030, maxSeqId=10040, bankSize=10 2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10040, maxSeqId=10050, bankSize=10 2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10050, maxSeqId=10060, bankSize=10 2026-06-01 19:18:03,745 |kJoinPool-1-worker-6 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,745 |kJoinPool-1-worker-6 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10060, maxSeqId=10070, bankSize=10 2026-06-01 19:18:03,746 |kJoinPool-1-worker-6 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,746 |kJoinPool-1-worker-6 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10070, maxSeqId=10080, bankSize=10 2026-06-01 19:18:03,746 |kJoinPool-1-worker-2 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,746 |kJoinPool-1-worker-2 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10080, maxSeqId=10090, bankSize=10 2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10090, maxSeqId=10100, bankSize=10 2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |TransactionUtil |W| No transaction in place, so not suspending. 2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10100, maxSeqId=10110, bankSize=10 Assumptions: Log Message: No transaction in place, so not suspending. Thought: Code is attempting to suspend a transaction when no transaction is currently active. Wrapping the suspend call in a check like if (TransactionUtil.isTransactionInPlace()) will eliminate this warning.
|
Thanks @ashishvijaywargiya for this. After look at you commit, I'm just thinking if we can simplify the code we improve the class TransactionUtil like : if (TransactionUtil.isTransactionInPlace()) {
parentTransaction = TransactionUtil.suspend();
}
beganTransaction = TransactionUtil.begin();By function like And behind this function your code with the isTransactionInPlace |
@nmalin, in my opinion, the changes proposed by @ashishvijaywargiya do not warrant adding a new method to While introducing the new method would certainly remove some lines of code from these classes, it would not allow populating the |
|
@jacopoc, Thank you for sharing your comment. I am moving ahead with these changes and merging them into the trunk. |
|
@jacopoc @ashishvijaywargiya, sure :) my suggest is to profit of the PR to open the thinking and no pb for the merge. I'm in face of this situation on custom site so the reason that I proposed this. If it's ok to improve the existing APi, this sound good for me to work on it. Thanks |
./gradlew testIntegration
BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d
2026-06-01 19:18:03,744 |kJoinPool-1-worker-9 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10000, maxSeqId=10010, bankSize=10
2026-06-01 19:18:03,744 |kJoinPool-1-worker-3 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,744 |kJoinPool-1-worker-3 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10010, maxSeqId=10020, bankSize=10
2026-06-01 19:18:03,745 |kJoinPool-1-worker-4 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,745 |kJoinPool-1-worker-4 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10020, maxSeqId=10030, bankSize=10
2026-06-01 19:18:03,745 |kJoinPool-1-worker-8 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,745 |kJoinPool-1-worker-8 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10030, maxSeqId=10040, bankSize=10
2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10040, maxSeqId=10050, bankSize=10
2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,745 |kJoinPool-1-worker-1 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10050, maxSeqId=10060, bankSize=10
2026-06-01 19:18:03,745 |kJoinPool-1-worker-6 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,745 |kJoinPool-1-worker-6 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10060, maxSeqId=10070, bankSize=10
2026-06-01 19:18:03,746 |kJoinPool-1-worker-6 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,746 |kJoinPool-1-worker-6 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10070, maxSeqId=10080, bankSize=10
2026-06-01 19:18:03,746 |kJoinPool-1-worker-2 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,746 |kJoinPool-1-worker-2 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10080, maxSeqId=10090, bankSize=10
2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10090, maxSeqId=10100, bankSize=10
2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |TransactionUtil |W| No transaction in place, so not suspending.
2026-06-01 19:18:03,746 |kJoinPool-1-worker-3 |SequenceUtil |I| Got bank of sequenced IDs for [BogusSequencebe00e860-64ec-4520-a02f-b5b718509d7d]; curSeqId=10100, maxSeqId=10110, bankSize=10
Assumptions:
Log Message: No transaction in place, so not suspending. Thought: Code is attempting to suspend a transaction when no transaction is currently active. Wrapping the suspend call in a check like if (TransactionUtil.isTransactionInPlace()) will eliminate this warning.