Skip to content

Fixing the console warnings: No transaction in place, so not suspending.#1310

Merged
ashishvijaywargiya merged 3 commits into
apache:trunkfrom
ashishvijaywargiya:test-integration-console-no-transaction-warning
Jun 3, 2026
Merged

Fixing the console warnings: No transaction in place, so not suspending.#1310
ashishvijaywargiya merged 3 commits into
apache:trunkfrom
ashishvijaywargiya:test-integration-console-no-transaction-warning

Conversation

@ashishvijaywargiya

Copy link
Copy Markdown
Contributor

./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.

./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.
@nmalin

nmalin commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

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

parentTransaction = TransactionUtil.suspendAndStartNewOne();

And behind this function your code with the isTransactionInPlace
What do you think ?

@jacopoc

jacopoc commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

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

parentTransaction = TransactionUtil.suspendAndStartNewOne();

And behind this function your code with the isTransactionInPlace What do you think ?

@nmalin, in my opinion, the changes proposed by @ashishvijaywargiya do not warrant adding a new method to TransactionUtil. In fact, the existing API, as used in this pull request, already produces code that is sufficiently clean and readable, at the cost of some code duplication across 8 classes.

While introducing the new method would certainly remove some lines of code from these classes, it would not allow populating the beganTransaction boolean variable and would make it less evident what is actually happening (i.e., a transaction is suspended only if there is a preexisting transaction).

@ashishvijaywargiya

Copy link
Copy Markdown
Contributor Author

@jacopoc, Thank you for sharing your comment.

I am moving ahead with these changes and merging them into the trunk.

@ashishvijaywargiya ashishvijaywargiya merged commit 6b1ccfc into apache:trunk Jun 3, 2026
5 checks passed
@nmalin

nmalin commented Jun 3, 2026

Copy link
Copy Markdown
Contributor

@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

@ashishvijaywargiya ashishvijaywargiya deleted the test-integration-console-no-transaction-warning branch June 7, 2026 19:17
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.

3 participants