gesterzhou commented on a change in pull request #6018:
URL: https://github.com/apache/geode/pull/6018#discussion_r573330660
##########
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:
cache is not null, but it could be closed at this point.
----------------------------------------------------------------
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]