jvarenina commented on a change in pull request #6036:
URL: https://github.com/apache/geode/pull/6036#discussion_r642882417
##########
File path:
geode-wan/src/distributedTest/java/org/apache/geode/internal/cache/wan/parallel/ParallelWANPropagationLoopBackDUnitTest.java
##########
@@ -410,9 +410,9 @@ public void
unstartedSenderShouldNotAddReceivedEventsIntoTmpDropped() {
vm3.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() +
"_PR", 100));
vm5.invoke(() -> WANTestBase.validateRegionSize(getTestMethodName() +
"_PR", 100));
- // verify tmpDroppedEvents should be 100 at site-ln, because the sender is
not started yet
- vm3.invoke(() -> WANTestBase.verifyTmpDroppedEventSize("ln", 100));
- vm5.invoke(() -> WANTestBase.verifyTmpDroppedEventSize("ln", 100));
+ // verify tmpDroppedEvents should be 0 at site-ln, because the sender is
not started yet
+ vm3.invoke(() -> WANTestBase.verifyTmpDroppedEventSize("ln", 0));
+ vm5.invoke(() -> WANTestBase.verifyTmpDroppedEventSize("ln", 0));
Review comment:
The thing is that I have changed design based behavior of manual-start
parameter. In design base, when this parameter is set to "true" then server
will not recover **persistent** parallel gateway-sender queue region at
startup. Data region in this case would remain offline until collocated queue
region is also recovered (queue regions will be recovered after gateway-sender
is started with gfsh command). With this new solution, colocated queue region
will be recovered in stopped state right after data region is recovered. This
way data region can immediately reach online status regardless of
gateway-sender status. I have decided to change this design base behavior
because manual-start parameter is deprecated and not recommended to use in
production. Also there are lots of test cases that are using`
manual-start=true`, and this way I could verify that recovering in stopped
state is working on many design base test cases. This impact related to
manual-start is really small, and I
can easily remove it. Should I return design base behavior in this case?
So to answer why it is now expected to have 0 temporary queued events? The
reason is because gateway-sender will now reach stopped state at startup (queue
buckets will be recovered). This is the same state as when running gateway
sender is stopped with gfsh command. In that case events aren't stored in
temporary dropped queue but instead registerEventDroppedInPrimaryQueue function
is called:
```
private void recordDroppedEvent(EntryEventImpl event) {
if (!this.isPrimary()) {
return;
}
if (this.eventProcessor != null) {
this.eventProcessor.registerEventDroppedInPrimaryQueue(event);
} else {
tmpDroppedEvents.add(event);
if (logger.isDebugEnabled()) {
logger.debug("added to tmpDroppedEvents event: {}", event);
}
}
if (logger.isDebugEnabled()) {
logger.debug("Returning without putting into the gateway sender queue:"
+ event);
}
}
```
You have introduced above behavior in GEODE-8491. Please notice when
gateway-sender is recovered in stopped state then eventProcessor is different
then null.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]