DonalEvans commented on a change in pull request #6018:
URL: https://github.com/apache/geode/pull/6018#discussion_r573327443
##########
File path:
geode-core/src/main/java/org/apache/geode/internal/cache/tx/RemoteOperationMessage.java
##########
@@ -169,14 +170,24 @@ public boolean checkDSClosing(ClusterDistributionManager
dm) {
*/
@Override
public void process(final ClusterDistributionManager dm) {
+ InternalCache cache = getCache(dm);
+ if (cache == null) {
+ String message = getCacheClosedMessage(dm);
+ ReplyException replyException = new ReplyException(new
CacheClosedException(message));
+ sendReply(getSender(), this.processorId, dm, replyException, null, 0);
+ return;
+ }
+ dm.getExecutors().getWaitingThreadPool().execute(() ->
doRemoteOperation(dm, cache));
+ }
+
+ void doRemoteOperation(ClusterDistributionManager dm, InternalCache cache) {
Throwable thr = null;
boolean sendReply = true;
LocalRegion r = null;
long startTime = 0;
try {
- InternalCache cache = getCache(dm);
if (checkCacheClosing(cache) || checkDSClosing(dm)) {
- String message = "Remote cache is closed: " + dm.getId();
+ String message = getCacheClosedMessage(dm);
if (cache == null) {
Review comment:
I think it should no longer be possible for `cache` to be null at this
point, given that we check if it's null in the `process()` method now.
----------------------------------------------------------------
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]