You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/01/23 22:55:40 UTC
[1/3] activemq-artemis git commit: ARTEMIS-357 No need to check copy
any longer
Repository: activemq-artemis
Updated Branches:
refs/heads/master 4a33d2d48 -> 156214049
ARTEMIS-357 No need to check copy any longer
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/7957f574
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/7957f574
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/7957f574
Branch: refs/heads/master
Commit: 7957f574f69e8ac037e3c7f187e2fca3ef9c05ae
Parents: 4a33d2d
Author: Clebert Suconic <cl...@apache.org>
Authored: Sat Jan 23 10:45:35 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Sat Jan 23 10:45:35 2016 -0500
----------------------------------------------------------------------
.../artemis/core/message/impl/MessageImpl.java | 21 --------------------
.../core/message/impl/MessageInternal.java | 4 ----
.../impl/wireformat/SessionSendMessage.java | 2 --
.../impl/ScheduledDeliveryHandlerTest.java | 10 ----------
4 files changed, 37 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
index 0c66aef..e7c33ff 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageImpl.java
@@ -84,8 +84,6 @@ public abstract class MessageImpl implements MessageInternal {
private int endOfMessagePosition;
- private boolean copied = true;
-
private UUID userID;
// Constructors --------------------------------------------------
@@ -152,7 +150,6 @@ public abstract class MessageImpl implements MessageInternal {
bufferValid = other.bufferValid;
endOfBodyPosition = other.endOfBodyPosition;
endOfMessagePosition = other.endOfMessagePosition;
- copied = other.copied;
if (other.buffer != null) {
// We need to copy the underlying buffer too, since the different messsages thereafter might have different
@@ -438,30 +435,12 @@ public abstract class MessageImpl implements MessageInternal {
@Override
public void bodyChanged() {
- // If the body is changed we must copy the buffer otherwise can affect the previously sent message
- // which might be in the Netty write queue
- checkCopy();
-
bufferValid = false;
endOfBodyPosition = -1;
}
@Override
- public synchronized void checkCopy() {
- if (!copied) {
- forceCopy();
-
- copied = true;
- }
- }
-
- @Override
- public synchronized void resetCopied() {
- copied = false;
- }
-
- @Override
public int getEndOfMessagePosition() {
return endOfMessagePosition;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java
index 728f1c5..a7b2199 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/message/impl/MessageInternal.java
@@ -33,12 +33,8 @@ public interface MessageInternal extends Message {
int getEndOfBodyPosition();
- void checkCopy();
-
void bodyChanged();
- void resetCopied();
-
boolean isServerMessage();
ActiveMQBuffer getEncodedBuffer();
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
----------------------------------------------------------------------
diff --git a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
index 300f8ed..78d4862 100644
--- a/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
+++ b/artemis-core-client/src/main/java/org/apache/activemq/artemis/core/protocol/core/impl/wireformat/SessionSendMessage.java
@@ -93,8 +93,6 @@ public class SessionSendMessage extends MessagePacket {
// Position reader for reading by Netty
bufferWrite.readerIndex(0);
- message.resetCopied();
-
return bufferWrite;
}
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/7957f574/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
index 2448b29..e3d6850 100644
--- a/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
+++ b/artemis-server/src/test/java/org/apache/activemq/artemis/core/server/impl/ScheduledDeliveryHandlerTest.java
@@ -430,21 +430,11 @@ public class ScheduledDeliveryHandlerTest extends Assert {
}
@Override
- public void checkCopy() {
-
- }
-
- @Override
public void bodyChanged() {
}
@Override
- public void resetCopied() {
-
- }
-
- @Override
public boolean isServerMessage() {
return false;
}
[3/3] activemq-artemis git commit: This closes #338
Posted by cl...@apache.org.
This closes #338
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/15621404
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/15621404
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/15621404
Branch: refs/heads/master
Commit: 15621404930fda032a1bc075013031edaa97b8fb
Parents: 4a33d2d 928ec60
Author: Clebert Suconic <cl...@apache.org>
Authored: Sat Jan 23 16:55:14 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Sat Jan 23 16:55:14 2016 -0500
----------------------------------------------------------------------
.../artemis/core/message/impl/MessageImpl.java | 21 --------------------
.../core/message/impl/MessageInternal.java | 4 ----
.../impl/wireformat/SessionSendMessage.java | 2 --
.../journal/impl/JournalFilesRepository.java | 6 ++----
.../impl/ScheduledDeliveryHandlerTest.java | 10 ----------
5 files changed, 2 insertions(+), 41 deletions(-)
----------------------------------------------------------------------
[2/3] activemq-artemis git commit: Removing invalid System.exit
Posted by cl...@apache.org.
Removing invalid System.exit
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/928ec603
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/928ec603
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/928ec603
Branch: refs/heads/master
Commit: 928ec603aabe6b7e4750e4957289dd0a0d038318
Parents: 7957f57
Author: Clebert Suconic <cl...@apache.org>
Authored: Sat Jan 23 16:42:37 2016 -0500
Committer: Clebert Suconic <cl...@apache.org>
Committed: Sat Jan 23 16:42:37 2016 -0500
----------------------------------------------------------------------
.../artemis/core/journal/impl/JournalFilesRepository.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/928ec603/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
----------------------------------------------------------------------
diff --git a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
index fe9d905..5eb2692 100644
--- a/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
+++ b/artemis-journal/src/main/java/org/apache/activemq/artemis/core/journal/impl/JournalFilesRepository.java
@@ -280,7 +280,7 @@ public class JournalFilesRepository {
ActiveMQJournalLogger.LOGGER.checkFiles();
ActiveMQJournalLogger.LOGGER.info(debugFiles());
ActiveMQJournalLogger.LOGGER.seqOutOfOrder();
- System.exit(-1);
+ throw new IllegalStateException("Sequence out of order");
}
if (journal.getCurrentFile() != null && journal.getCurrentFile().getFileID() <= file.getFileID()) {
@@ -356,9 +356,7 @@ public class JournalFilesRepository {
calculatedSize = file.getFile().size();
}
catch (Exception e) {
- e.printStackTrace();
- System.out.println("Can't get file size on " + file);
- System.exit(-1);
+ throw new IllegalStateException(e.getMessage() + " file: " + file);
}
if (calculatedSize != fileSize) {
ActiveMQJournalLogger.LOGGER.deletingFile(file);