kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-2048; Change lock synchronized to inLock() for partitionMapCond; reviewed by Guozhang Wang
Date Wed, 25 Mar 2015 03:56:33 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 991195416 -> 4e0da4965


KAFKA-2048; Change lock synchronized to inLock() for partitionMapCond; reviewed by Guozhang
Wang


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/4e0da496
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/4e0da496
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/4e0da496

Branch: refs/heads/trunk
Commit: 4e0da4965b83b25debdec4d55e075c18be436fa8
Parents: 9911954
Author: Tao Xiao <xiaotao183@gmail.com>
Authored: Tue Mar 24 20:56:22 2015 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Tue Mar 24 20:56:22 2015 -0700

----------------------------------------------------------------------
 core/src/main/scala/kafka/server/AbstractFetcherThread.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/4e0da496/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
index e731df4..5d5cf58 100644
--- a/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
+++ b/core/src/main/scala/kafka/server/AbstractFetcherThread.scala
@@ -100,7 +100,7 @@ abstract class AbstractFetcherThread(name: String, clientId: String, sourceBroke
       case t: Throwable =>
         if (isRunning.get) {
           warn("Error in fetch %s. Possible cause: %s".format(fetchRequest, t.toString))
-          partitionMapLock synchronized {
+          inLock(partitionMapLock) {
             partitionsWithError ++= partitionMap.keys
             // there is an error occurred while fetching partitions, sleep a while
             partitionMapCond.await(fetchBackOffMs, TimeUnit.MILLISECONDS)


Mime
View raw message