You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@geode.apache.org by GitBox <gi...@apache.org> on 2022/02/07 19:57:39 UTC

[GitHub] [geode] jchen21 commented on a change in pull request #7334: GEODE-9990: turn DiskAccessException into CacheClosedException

jchen21 commented on a change in pull request #7334:
URL: https://github.com/apache/geode/pull/7334#discussion_r801007811



##########
File path: geode-core/src/main/java/org/apache/geode/internal/cache/DiskInitFile.java
##########
@@ -1310,7 +1311,16 @@ private void writeIFRecord(ByteBuffer bb) throws IOException {
   private void writeIFRecord(ByteBuffer bb, boolean doStats) throws IOException {
     assert lock.isHeldByCurrentThread();
     if (closed) {
-      throw new DiskAccessException("The disk store is closed", parent);
+      parent.getCache().getCancelCriterion().checkCancelInProgress();
+
+      if (parent.isClosed() || parent.isClosing()) {
+        throw new CacheClosedException("The disk store is closed or closing");

Review comment:
       I am not sure why `CacheClosedException` is thrown here. If the cache is closed, I assume `checkCancelInProgress` will throw `CacheClosedException`.




-- 
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.

To unsubscribe, e-mail: notifications-unsubscribe@geode.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org