jvarenina commented on a change in pull request #6036:
URL: https://github.com/apache/geode/pull/6036#discussion_r642880563
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/wan/parallel/ParallelGatewaySenderQueue.java
##########
@@ -305,8 +307,9 @@ public int compare(Region o1, Region o2) {
queueEmptyLock = new StoppableReentrantLock(sender.getCancelCriterion());
queueEmptyCondition = queueEmptyLock.newCondition();
- // initialize the conflation thread pool if conflation is enabled
- if (sender.isBatchConflationEnabled()) {
+ removalThread = new BatchRemovalThread(this.sender.getCache(), this);
Review comment:
1. Yes, because I don't want to start batch removal processe in stopped
state. Before this impact is introduced the removal thread processor was
initialized and started as follows:
```
/** Start the background batch removal thread. */
public void start() {
// at present, this won't be accessed by multiple threads,
// still, it is safer approach to synchronize it
synchronized (ParallelGatewaySenderQueue.class) {
if (removalThread == null) {
removalThread = new BatchRemovalThread(this.sender.getCache(), this);
removalThread.start();
}
}
}
```
Now I want to only initialize the BatchRemovalThread because some of its
functions (check function sendQueueRemovalMesssageForDroppedEvent) are used
while handling events in stopped state. There is no need to start batch removal
processor thread in stopped state.
--
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]