Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

As described above, dropped events in the primary gateway sender are stored in a member variable. It is out of the scope of this RFC to change how those events are stored.

Solution

The solution proposes to change the primary gateway sender so that it does not store dropped events when it is stopped explicitly (not while starting). The reason is that these events could never end in the queue of any secondary gateway sender and will use memory unnecessarily.

In order to do so, it is proposed to add a new boolean member variable to the AbstractGatewaySender that will tell if the primary gateway sender must store dropped events or not.

  • This member variable will must be set to false (do not store dropped events) in the primary and secondary gateway sender instances in a second step added to the :
    • At gateway sender creation if the --manual-start option was used.
    • Right after stopping the gateway sender using the gfsh stop gateway sender command
    , right after the stop of the gateway senders has been completed
    • .
  • This member variable will must be set to true (store dropped events) in the primary and secondary gateway sender instances in a prior step added to the start gateway sender gfsh command, before the start of the senders is executed:
    • At gateway sender creation if the --manual-start option was not used or set to false.
    • Right before a start gateway sender gfsh command is executed.

The start gateway sender and stop gateway sender gfsh commands would be modified as follows in order to set the member value of the gateway sender accordingly:

  • Code will be added at the end of the current stop gateway sender gfsh command which will set to false the new member variable (after the gateway senders have been stopped).
  • Code will be added at the beginning of the current start gateway sender gfsh command which will set to true the new member variable (before the gateway senders are started).

A draft PR of the solution can be found here: https://github.com/apache/geode/pull/5348

...