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 06:50:08 UTC
[incubator-celeborn] branch branch-0.1 updated: [CELEBORN-69] Fullyread check in FileManagedBuffers is not accurate (#1009)
This is an automated email from the ASF dual-hosted git repository.
zhouky pushed a commit to branch branch-0.1
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git
The following commit(s) were added to refs/heads/branch-0.1 by this push:
new bf73d239 [CELEBORN-69] Fullyread check in FileManagedBuffers is not accurate (#1009)
bf73d239 is described below
commit bf73d2395cc26d78e76eae4aad5cd15f717097fb
Author: Keyong Zhou <zh...@apache.org>
AuthorDate: Sat Nov 26 14:50:05 2022 +0800
[CELEBORN-69] Fullyread check in FileManagedBuffers is not accurate (#1009)
---
.../emr/rss/common/network/client/ChunkFetchFailureException.java | 4 +++-
.../com/aliyun/emr/rss/common/network/server/FileManagedBuffers.java | 2 +-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/common/src/main/java/com/aliyun/emr/rss/common/network/client/ChunkFetchFailureException.java b/common/src/main/java/com/aliyun/emr/rss/common/network/client/ChunkFetchFailureException.java
index 0e7c4478..37f7af5d 100644
--- a/common/src/main/java/com/aliyun/emr/rss/common/network/client/ChunkFetchFailureException.java
+++ b/common/src/main/java/com/aliyun/emr/rss/common/network/client/ChunkFetchFailureException.java
@@ -17,10 +17,12 @@
package com.aliyun.emr.rss.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);
}
diff --git a/common/src/main/java/com/aliyun/emr/rss/common/network/server/FileManagedBuffers.java b/common/src/main/java/com/aliyun/emr/rss/common/network/server/FileManagedBuffers.java
index f6e7f09a..bed0c57b 100644
--- a/common/src/main/java/com/aliyun/emr/rss/common/network/server/FileManagedBuffers.java
+++ b/common/src/main/java/com/aliyun/emr/rss/common/network/server/FileManagedBuffers.java
@@ -75,7 +75,7 @@ public class FileManagedBuffers {
synchronized (chunkTracker) {
chunkTracker.set(chunkIndex);
}
- if (chunkIndex == numChunks - 1) {
+ if (chunkTracker.cardinality() == numChunks) {
fullyRead = true;
}
}