You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by clebertsuconic <gi...@git.apache.org> on 2016/09/03 01:46:11 UTC
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
GitHub user clebertsuconic opened a pull request:
https://github.com/apache/activemq-artemis/pull/749
ARTEMIS-581 Implement max disk usage, and global-max-size
max-disk-usage = how much of a disk we can use before the system blocks
global-max-size = how much bytes we can take from memory for messages before we start enter into the configured page mode
This will also change the default created configuration into page-mode as that's more reliable for systems.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/clebertsuconic/activemq-artemis paging
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/activemq-artemis/pull/749.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #749
----
commit f84d9d105901253d079ec8dd42b888f15f356354
Author: Clebert Suconic <cl...@apache.org>
Date: 2016-09-02T20:30:44Z
ARTEMIS-581 Implement max disk usage, and global-max-size
max-disk-usage = how much of a disk we can use before the system blocks
global-max-size = how much bytes we can take from memory for messages before we start enter into the configured page mode
This will also change the default created configuration into page-mode as that's more reliable for systems.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77524869
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
What do you mean by silently fail? If the client chooses an appropriate
QoS level (or protocol equivilent) it'll never get an ack and thus as far
as the client is concerned the broker never received it.
On Mon, Sep 5, 2016 at 2:49 PM, clebertsuconic <no...@github.com>
wrote:
> In artemis-server/src/main/java/org/apache/activemq/artemis/
> core/server/impl/ServerSessionImpl.java
> <https://github.com/apache/activemq-artemis/pull/749#discussion_r77524662>
> :
>
> > @@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
> >
> > @Override
> > public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
> > +
> > + // If the protocol doesn't support flow control, we have no choice other than fail the communication
> > + if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
> > + ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
> > + this.getRemotingConnection().fail(exception);
> > + throw exception;
>
> there is no way to tell the producers on these protocols that the message
> failed. Keep coming would endup on a drop and the producer may thing it was
> sent ok. It would be a message loss without communicating the failure to
> the producer.
>
> Is it possible to configure it to go from PAGING to DROP once the disk
> limit is reached?
>
> you can already configure global-max-size to DROP.
>
> I *strongly* advise against silently fail. (I have a strong opinion on
> this subject). I won't silently fail a message send on purpose here.
>
> \u2014
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/activemq-artemis/pull/749/files/f84d9d105901253d079ec8dd42b888f15f356354#r77524662>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAOCy2c6jvpra-IFJzF4wUJTfzmGqJqhks5qnB3PgaJpZM4J0MjB>
> .
>
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77523234
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
There are only two possible solutions:
i - block the connection, which would end up also blocking consumers on the same connection. (by setting readable to false on the Netty Connection)
ii - fail like I'm doing.
I chosen ii as it would also endup killing the connection due to TTL or anything else.
Dropping is not acceptable as it would silently fail. The user would believe a message was sent which would endup lost. It's a bigger risk we can't measure.
When the user configure it as DROP he's saying he can afford a lost, we can't measure that and we couldn't do such thing here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/activemq-artemis/pull/749
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77522847
--- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java ---
@@ -429,6 +429,12 @@ public static String getDefaultHapolicyBackupStrategy() {
// Default period to wait between configuration file checks
public static final long DEFAULT_CONFIGURATION_FILE_REFRESH_PERIOD = 5000;
+ public static final long DEFAULT_GLOBAL_MAX_SIZE = -1;
--- End diff --
USAGE implies %, and it would be confusing with the other parameter.
AddressSize's counterpart of this is called getMaxSizeBytes. I could call rename them all to maxSizeBytes. (I was happy with just max_size though :) )
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77490114
--- Diff: artemis-core-client/src/main/java/org/apache/activemq/artemis/api/config/ActiveMQDefaultConfiguration.java ---
@@ -429,6 +429,12 @@ public static String getDefaultHapolicyBackupStrategy() {
// Default period to wait between configuration file checks
public static final long DEFAULT_CONFIGURATION_FILE_REFRESH_PERIOD = 5000;
+ public static final long DEFAULT_GLOBAL_MAX_SIZE = -1;
--- End diff --
Can this setting have some more context like DEFAULT_GLOBAL_MAX_MEMORY_USAGE
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis issue #749: ARTEMIS-581 Implement max disk usage, and globa...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:
https://github.com/apache/activemq-artemis/pull/749
wrote a small post about this: http://clebertsuconic.blogspot.com/2016/09/epic-change-on-artemis-140-coming-up.html
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77526135
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
Failng the send here would endup the STOMP or MQTT producer to believe the message was sent.
if you want that level of QOS set global-max-size to something meaninful and configure it to DROP.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77525186
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
Also AMQP has a built in mechanism to handle this exact situation i.e. rejected messages. We should at least do it properly for AMQP.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77527471
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
That's why there's a layway.. the user configured the max-disk-size = some percentage.
if you want to implement all these possible outcomes for disk ful
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77524662
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
there is no way to tell the producers on these protocols that the message failed. Keep coming would endup on a drop and the producer may thing it was sent ok. It would be a message loss without communicating the failure to the producer.
>> Is it possible to configure it to go from PAGING to DROP once the disk limit is reached?
you can already configure global-max-size to DROP.
I **strongly** advise against silently fail. (I have a strong opinion on this subject). I won't silently fail a message send on purpose here.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77526654
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
When I say QoS I mean the QoS sent by the client. In the MQTT case, if you
send a message with QoS1 to the broker, the broker must ack it, otherwise
the client assumes that the message was never received then retries at some
later date. So it's not a silent fail. The client never thinks the broker
got the message.
With AMQP, STOMP and OpenWire. It's a little harder than just blocking
using flow control, there's no way (at least that I know of) to revoke
credits once they've been allocated in AMQP and CORE. This means clients
are able to continue sending potentially causing an OOM.
On Mon, Sep 5, 2016 at 3:00 PM, clebertsuconic <no...@github.com>
wrote:
> In artemis-server/src/main/java/org/apache/activemq/artemis/
> core/server/impl/ServerSessionImpl.java
> <https://github.com/apache/activemq-artemis/pull/749#discussion_r77526135>
> :
>
> > @@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
> >
> > @Override
> > public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
> > +
> > + // If the protocol doesn't support flow control, we have no choice other than fail the communication
> > + if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
> > + ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
> > + this.getRemotingConnection().fail(exception);
> > + throw exception;
>
> Failng the send here would endup the STOMP or MQTT producer to believe the
> message was sent.
>
> if you want that level of QOS set global-max-size to something meaninful
> and configure it to DROP.
>
> \u2014
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/activemq-artemis/pull/749/files/f84d9d105901253d079ec8dd42b888f15f356354#r77526135>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AAOCy9VkkrKDq5uWaBYyXKvTfgU4K6qTks5qnCBsgaJpZM4J0MjB>
> .
>
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis issue #749: ARTEMIS-581 Implement max disk usage, and globa...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:
https://github.com/apache/activemq-artemis/pull/749
Just a heads up: I have ran the whole testsuite for this. so far so good.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77524578
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
Also even with flow control switched on, the client is still able to send until it's current credit.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77525934
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
This is only for protocols that won't support Flow Control @mtaylor.
For AMQP OpenWire and CORE we are blocking on disk full.
On Stomp and MQTT I am failing the connection.
For an exception here won't have a way to communicate the exception to the client, it would silently fail on this case.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77524240
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
Why are these the only 2 solutions? Surely we want to keep consumers alive so we can gracefully recover from the situation?
Killing the connections could kill all the consumers too making it difficult to recover once the memory and disk limit is reached. DROP doesn't necessarily mean the messages are lost, the client should choose an appropriate qos level and retry later. Is it possible to configure it to go from PAGING to DROP once the disk limit is reached?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis issue #749: ARTEMIS-581 Implement max disk usage, and globa...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on the issue:
https://github.com/apache/activemq-artemis/pull/749
I was waiting these changes for the release. will make a release next week when this is merged.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77493191
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java ---
@@ -1249,6 +1256,14 @@ public RoutingStatus send(final ServerMessage message, final boolean direct) thr
@Override
public RoutingStatus send(final ServerMessage message, final boolean direct, boolean noAutoCreateQueue) throws Exception {
+
+ // If the protocol doesn't support flow control, we have no choice other than fail the communication
+ if (!this.getRemotingConnection().isSupportsFlowControl() && pagingManager.isDiskFull()) {
+ ActiveMQIOErrorException exception = ActiveMQMessageBundle.BUNDLE.diskBeyondLimit();
+ this.getRemotingConnection().fail(exception);
+ throw exception;
--- End diff --
I'm not sure if killing the connection is the right thing to do here? You may also be killing consumers on the connection... Can't we just start dropping messages once this threshold is reached?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by clebertsuconic <gi...@git.apache.org>.
Github user clebertsuconic commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77522996
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java ---
@@ -370,4 +371,8 @@
@Message(id = 119118, value = "Management method not applicable for current server configuration")
IllegalStateException methodNotApplicable();
+
+ @Message(id = 119119, value = "Disk Capacity is Low, cannot producer more messages.")
--- End diff --
it was a typo.. fixed.
Thanks
@mtaylor ^
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] activemq-artemis pull request #749: ARTEMIS-581 Implement max disk usage, an...
Posted by mtaylor <gi...@git.apache.org>.
Github user mtaylor commented on a diff in the pull request:
https://github.com/apache/activemq-artemis/pull/749#discussion_r77490346
--- Diff: artemis-server/src/main/java/org/apache/activemq/artemis/core/server/ActiveMQMessageBundle.java ---
@@ -370,4 +371,8 @@
@Message(id = 119118, value = "Management method not applicable for current server configuration")
IllegalStateException methodNotApplicable();
+
+ @Message(id = 119119, value = "Disk Capacity is Low, cannot producer more messages.")
--- End diff --
s/producer/produce
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---