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 7434098922 ARTEMIS-4278 Code Improvements after comments from RVais on
PR #4472
7434098922 is described below
commit 7434098922bd83d41dac6ed8a06b9e33619cff3e
Author: Clebert Suconic <[email protected]>
AuthorDate: Mon May 15 17:32:20 2023 -0400
ARTEMIS-4278 Code Improvements after comments from RVais on PR #4472
---
.../core/paging/cursor/impl/PageCounterRebuildManager.java | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
diff --git
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCounterRebuildManager.java
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCounterRebuildManager.java
index 59ba4c9f16..b7218d65d7 100644
---
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCounterRebuildManager.java
+++
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/cursor/impl/PageCounterRebuildManager.java
@@ -257,9 +257,7 @@ public class PageCounterRebuildManager implements Runnable {
Transaction preparedTX = txInfo == null ? null :
txInfo.getPreparedTransaction();
if (logger.isTraceEnabled()) {
- if (logger.isTraceEnabled()) {
- logger.trace("lookup on {}, tx={}, preparedTX={}",
msg.getTransactionID(), txInfo, preparedTX);
- }
+ logger.trace("lookup on {}, tx={}, preparedTX={}",
msg.getTransactionID(), txInfo, preparedTX);
}
for (long queueID : routedQueues) {
@@ -273,7 +271,7 @@ public class PageCounterRebuildManager implements Runnable {
@Override
public void afterCommit(Transaction tx) {
// We use the pagingManager executor here, in case
the commit happened while the rebuild manager is working
- // on that case the increment will wait any pending
tasks on that executor to finish before this executor takes effect
+ // in that case the increment will wait any pending
tasks on that executor to finish before this executor takes effect
pagingManager.execute(() -> {
try {
subscription.getCounter().increment(null, 1,
msg.getStoredSize());
@@ -285,13 +283,13 @@ public class PageCounterRebuildManager implements
Runnable {
});
} else {
- boolean txOK = msg.getTransactionID() <= 0 ||
transactions == null || txInfo != null;
+ boolean txIncluded = msg.getTransactionID() <= 0 ||
transactions == null || txInfo != null;
- if (!txOK) {
- logger.debug("TX is not ok for {}", msg);
+ if (!txIncluded) {
+ logger.debug("TX is not included for {}", msg);
}
- if (ok && txOK) { // not acked and TX is ok
+ if (ok && txIncluded) { // not acked and TX is ok
if (logger.isTraceEnabled()) {
logger.trace("Message pageNumber={}/{} NOT acked on
queue {}", msg.getPageNumber(), msg.getMessageNumber(), queueID);
}