You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by Alberto Gomez <al...@est.tech> on 2020/12/10 15:58:18 UTC

Question about -Dgemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION

Hi,

I have recently discovered the "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION" Geode System property that allows to change the default behavior of Gateway Senders so that when an exception occurs when handling an event, instead of proceeding with the rest of events in the batch and sending back to the sender an exception for the event (which is ignored), the Gateway Receiver sleeps for half a second and retries to apply the event until it succeeds.

As this property is not in the documentation (as far as I know) and it can only be activated by using the above property when starting the servers hosting gateway senders, I would like to know if it is safe to use, i.e. it will not be removed in the future and also if there are any considerations to make when using it, given that it is not Geode's default behavior.

I have noticed that there are test cases specifically testing this property (See KeepEventsOnGatewaySenderQueueDUnitTest.hava).

Thanks in advance,

/Alberto G.

Re: Question about -Dgemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION

Posted by Alberto Gomez <al...@est.tech>.
Barry, thanks a lot for the clarifications.

Best regards,

/Alberto G.
________________________________
From: Barrett Oglesby <bo...@vmware.com>
Sent: Thursday, December 10, 2020 8:20 PM
To: dev@geode.apache.org <de...@geode.apache.org>
Subject: Re: Question about -Dgemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION

Alberto,

There are a lot of applications that use this property, so I wouldn't expect it to be removed.

Here is some additional detail regarding this property:

The default behavior is if a sender in one site can connect successfully to a receiver in another and send batches to it, the acks received for those batches cause them to be removed from the sender queue. It doesn't matter what happens on that remote site. Every event could fail; every event could succeed. If an ack is received, the batch is removed.

The gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION system property reverses that behavior and keep batches on the sender queue until all their events are applied successfully by the receiver in the remote site.

The default behavior can cause sites to be out of sync, and the system property behavior can cause infinite retries and OOM in the sender if the receiver in the remote site never successfully processes a batch.

There is a draft proposal for a callback that is a middle ground between these two behaviors, but it hasn't been implemented at this point.

Barry
________________________________
From: Alberto Gomez <al...@est.tech>
Sent: Thursday, December 10, 2020 7:58 AM
To: dev@geode.apache.org <de...@geode.apache.org>
Subject: Question about -Dgemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION

Hi,

I have recently discovered the "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION" Geode System property that allows to change the default behavior of Gateway Senders so that when an exception occurs when handling an event, instead of proceeding with the rest of events in the batch and sending back to the sender an exception for the event (which is ignored), the Gateway Receiver sleeps for half a second and retries to apply the event until it succeeds.

As this property is not in the documentation (as far as I know) and it can only be activated by using the above property when starting the servers hosting gateway senders, I would like to know if it is safe to use, i.e. it will not be removed in the future and also if there are any considerations to make when using it, given that it is not Geode's default behavior.

I have noticed that there are test cases specifically testing this property (See KeepEventsOnGatewaySenderQueueDUnitTest.hava).

Thanks in advance,

/Alberto G.

Re: Question about -Dgemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION

Posted by Barrett Oglesby <bo...@vmware.com>.
Alberto,

There are a lot of applications that use this property, so I wouldn't expect it to be removed.

Here is some additional detail regarding this property:

The default behavior is if a sender in one site can connect successfully to a receiver in another and send batches to it, the acks received for those batches cause them to be removed from the sender queue. It doesn't matter what happens on that remote site. Every event could fail; every event could succeed. If an ack is received, the batch is removed.

The gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION system property reverses that behavior and keep batches on the sender queue until all their events are applied successfully by the receiver in the remote site.

The default behavior can cause sites to be out of sync, and the system property behavior can cause infinite retries and OOM in the sender if the receiver in the remote site never successfully processes a batch.

There is a draft proposal for a callback that is a middle ground between these two behaviors, but it hasn't been implemented at this point.

Barry
________________________________
From: Alberto Gomez <al...@est.tech>
Sent: Thursday, December 10, 2020 7:58 AM
To: dev@geode.apache.org <de...@geode.apache.org>
Subject: Question about -Dgemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION

Hi,

I have recently discovered the "gemfire.GatewaySender.REMOVE_FROM_QUEUE_ON_EXCEPTION" Geode System property that allows to change the default behavior of Gateway Senders so that when an exception occurs when handling an event, instead of proceeding with the rest of events in the batch and sending back to the sender an exception for the event (which is ignored), the Gateway Receiver sleeps for half a second and retries to apply the event until it succeeds.

As this property is not in the documentation (as far as I know) and it can only be activated by using the above property when starting the servers hosting gateway senders, I would like to know if it is safe to use, i.e. it will not be removed in the future and also if there are any considerations to make when using it, given that it is not Geode's default behavior.

I have noticed that there are test cases specifically testing this property (See KeepEventsOnGatewaySenderQueueDUnitTest.hava).

Thanks in advance,

/Alberto G.