You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2015/07/29 18:26:23 UTC
activemq-cpp git commit:
https://issues.apache.org/jira/browse/AMQCPP-577
Repository: activemq-cpp
Updated Branches:
refs/heads/master da83ca6f3 -> 0c9771107
https://issues.apache.org/jira/browse/AMQCPP-577
Fix access that can lead to an NPE that causes the TX to keep rolling
back after failover.
Project: http://git-wip-us.apache.org/repos/asf/activemq-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-cpp/commit/0c977110
Tree: http://git-wip-us.apache.org/repos/asf/activemq-cpp/tree/0c977110
Diff: http://git-wip-us.apache.org/repos/asf/activemq-cpp/diff/0c977110
Branch: refs/heads/master
Commit: 0c97711073ea607960d67e04e14caf6fda7c6c2d
Parents: da83ca6
Author: Timothy Bish <ta...@gmail.com>
Authored: Wed Jul 29 12:26:07 2015 -0400
Committer: Timothy Bish <ta...@gmail.com>
Committed: Wed Jul 29 12:26:07 2015 -0400
----------------------------------------------------------------------
.../src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-cpp/blob/0c977110/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
----------------------------------------------------------------------
diff --git a/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp b/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
index 6723a9d..f5f957a 100644
--- a/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
+++ b/activemq-cpp/src/main/activemq/core/kernels/ActiveMQConsumerKernel.cpp
@@ -274,8 +274,9 @@ namespace kernels {
}
}
if (numberNotReplayed > 0) {
- std::string message = std::string("rolling back transaction (") +
- previouslyDeliveredMessages->transactionId->toString() +
+ std::string txId = previouslyDeliveredMessages->transactionId != NULL ?
+ previouslyDeliveredMessages->transactionId->toString() : "<None>";
+ std::string message = std::string("rolling back transaction (") + txId +
") post failover recovery. " + Integer::toString(numberNotReplayed) +
" previously delivered message(s) not replayed to consumer: " +
info->getConsumerId()->toString();
@@ -1420,7 +1421,7 @@ void ActiveMQConsumerKernel::acknowledge() {
try {
- clearDeliveredList();
+ this->internal->clearDeliveredList();
this->internal->waitForRedeliveries();
synchronized(&this->internal->deliveredMessages) {