You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by aa...@apache.org on 2020/04/07 05:38:24 UTC
[hadoop] branch trunk updated: HDFS-15249 ThrottledAsyncChecker is
not thread-safe. (#1922)
This is an automated email from the ASF dual-hosted git repository.
aajisaka pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new c12ddbd HDFS-15249 ThrottledAsyncChecker is not thread-safe. (#1922)
c12ddbd is described below
commit c12ddbd1de40b32bbe2f6a3e484abf843d6d92ae
Author: Toshihiro Suzuki <br...@gmail.com>
AuthorDate: Tue Apr 7 14:38:09 2020 +0900
HDFS-15249 ThrottledAsyncChecker is not thread-safe. (#1922)
---
.../hadoop/hdfs/server/datanode/checker/ThrottledAsyncChecker.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/ThrottledAsyncChecker.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/ThrottledAsyncChecker.java
index 032379a..6f04129 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/ThrottledAsyncChecker.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/datanode/checker/ThrottledAsyncChecker.java
@@ -117,8 +117,8 @@ public class ThrottledAsyncChecker<K, V> implements AsyncChecker<K, V> {
* will receive the same Future.
*/
@Override
- public Optional<ListenableFuture<V>> schedule(Checkable<K, V> target,
- K context) {
+ public synchronized Optional<ListenableFuture<V>> schedule(
+ Checkable<K, V> target, K context) {
if (checksInProgress.containsKey(target)) {
return Optional.empty();
}
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org