This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new 83da100755 ARTEMIS-5564 followup on a logging statement on AckManager
83da100755 is described below
commit 83da100755d23d00f0cdec158b26e832c3a6543b
Author: Clebert Suconic <[email protected]>
AuthorDate: Wed Jul 9 11:03:48 2025 -0400
ARTEMIS-5564 followup on a logging statement on AckManager
---
.../artemis/protocol/amqp/connect/mirror/AckManager.java | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AckManager.java
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AckManager.java
index 01b2698373..bf399514e2 100644
---
a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AckManager.java
+++
b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/connect/mirror/AckManager.java
@@ -271,11 +271,9 @@ public class AckManager implements ActiveMQComponent {
if (checkRetriesAndPaging(acksToRetry, snapshotCount)) {
logger.trace("scanning paging for {}", address);
- boolean completeSnapshot = false;
PagingStore store =
server.getPagingManager().getPageStore(address);
for (long pageId = store.getFirstPage(); pageId <=
store.getCurrentWritingPage(); pageId++) {
if (isSnapshotComplete(snapshotCount)) {
- completeSnapshot = true;
logger.debug("AckManager Page Scanning complete (done) on
address {}", address);
break;
}
@@ -289,15 +287,21 @@ public class AckManager implements ActiveMQComponent {
page.usageDown();
}
}
- if (!completeSnapshot) {
- // completeSnapshot == true, it means that every record meant
to be acked was used,
+
+ // a note on the following statement:
+ // I used to store the result of isSnapshotComplete in a variable
+ // however in the case where we got to the end of the list and at
the same time the snapshot was emptied,
+ // we would still print any logging on the next block, and verify
the expired sets
+ // You can see the difference between this and the previous commit
on ARTEMIS-5564
+ if (!isSnapshotComplete(snapshotCount)) {
+ // isSnapshotComplete == true, it means that every record meant
to be acked was used,
// so there is no need to check the expired set and we bypass
this check
// we used to check this every page scan, but as an
optimization we removed this unecessary step
validateExpiredSet(address, acksToRetry);
if (logger.isDebugEnabled()) {
logger.debug("Retry page address got to the end of the list
without still finding a few records to acknowledge");
- snapshotCount.forEach((l, c) -> logger.warn("debug {} still
have {} ack records after the scan is finished", l, c));
+ snapshotCount.forEach((l, c) -> logger.warn("queue {} still
have {} ack records after the scan is finished", l, c));
acksToRetry.forEach((l, m) -> {
logger.debug("Records on queue {}:", l);
m.forEach((ack1, ack2) -> {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact