You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@celeborn.apache.org by zh...@apache.org on 2022/11/26 07:04:33 UTC
[incubator-celeborn] branch main updated: [CELEBORN-69] Fullyread check in FileManagedBuffers is not accurate (#1008)
This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/main by this push:
new 04e86062 [CELEBORN-69] Fullyread check in FileManagedBuffers is not accurate (#1008)
04e86062 is described below
commit 04e86062f0c057fa92fffbea9e358436dbc4169a
Author: Keyong Zhou <zh...@apache.org>
AuthorDate: Sat Nov 26 15:04:29 2022 +0800
[CELEBORN-69] Fullyread check in FileManagedBuffers is not accurate (#1008)
---
.../main/java/org/apache/celeborn/common/meta/FileManagedBuffers.java | 2 +-
.../celeborn/common/network/client/ChunkFetchFailureException.java | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/common/src/main/java/org/apache/celeborn/common/meta/FileManagedBuffers.java b/common/src/main/java/org/apache/celeborn/common/meta/FileManagedBuffers.java
index 70ade3ac..f36b270b 100644
--- a/common/src/main/java/org/apache/celeborn/common/meta/FileManagedBuffers.java
+++ b/common/src/main/java/org/apache/celeborn/common/meta/FileManagedBuffers.java
@@ -76,7 +76,7 @@ public class FileManagedBuffers {
synchronized (chunkTracker) {
chunkTracker.set(chunkIndex);
}
- if (chunkIndex == numChunks - 1) {
+ if (chunkTracker.cardinality() == numChunks) {
fullyRead = true;
}
}
diff --git a/common/src/main/java/org/apache/celeborn/common/network/client/ChunkFetchFailureException.java b/common/src/main/java/org/apache/celeborn/common/network/client/ChunkFetchFailureException.java
index ceea1c95..18c69b0f 100644
--- a/common/src/main/java/org/apache/celeborn/common/network/client/ChunkFetchFailureException.java
+++ b/common/src/main/java/org/apache/celeborn/common/network/client/ChunkFetchFailureException.java
@@ -17,8 +17,10 @@
package org.apache.celeborn.common.network.client;
+import java.io.IOException;
+
/** General exception caused by a remote exception while fetching a chunk. */
-public class ChunkFetchFailureException extends RuntimeException {
+public class ChunkFetchFailureException extends IOException {
public ChunkFetchFailureException(String errorMsg, Throwable cause) {
super(errorMsg, cause);
}