You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gu...@apache.org on 2015/03/25 04:56:33 UTC

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

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 <xi...@gmail.com>
Authored: Tue Mar 24 20:56:22 2015 -0700
Committer: Guozhang Wang <wa...@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)