You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by jk...@apache.org on 2015/03/08 23:15:02 UTC
kafka git commit: KAFKA-2009 Fix two minor bugs in mirror maker.
Repository: kafka
Updated Branches:
refs/heads/trunk 8f0003f9b -> 67940c43e
KAFKA-2009 Fix two minor bugs in mirror maker.
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/67940c43
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/67940c43
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/67940c43
Branch: refs/heads/trunk
Commit: 67940c43e0efa6a49af1fe928fe73a13b21d57f1
Parents: 8f0003f
Author: jqin <be...@gmail.com>
Authored: Sun Mar 8 15:10:54 2015 -0700
Committer: Jay Kreps <ja...@gmail.com>
Committed: Sun Mar 8 15:10:54 2015 -0700
----------------------------------------------------------------------
core/src/main/scala/kafka/tools/MirrorMaker.scala | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/67940c43/core/src/main/scala/kafka/tools/MirrorMaker.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/kafka/tools/MirrorMaker.scala b/core/src/main/scala/kafka/tools/MirrorMaker.scala
index 5374280..bafa379 100644
--- a/core/src/main/scala/kafka/tools/MirrorMaker.scala
+++ b/core/src/main/scala/kafka/tools/MirrorMaker.scala
@@ -589,7 +589,7 @@ object MirrorMaker extends Logging with KafkaMetricsGroup {
"of skipped unacked messages is" + numSkippedUnackedMessages.incrementAndGet())
super.onCompletion(metadata, exception)
} else {
- trace("Updating offset for %s to %d".format(topicPartition, offset))
+ trace("Updating offset for %s to %d".format(topicPartition, offset.element))
}
// remove the offset from the unackedOffsets
val unackedOffsets = unackedOffsetsMap.get(topicPartition)
@@ -662,7 +662,9 @@ object MirrorMaker extends Logging with KafkaMetricsGroup {
}
def removeOffset(offset: DoublyLinkedListNode[Long]) {
- offsetList.remove(offset)
+ this synchronized {
+ offsetList.remove(offset)
+ }
}
def getOffsetToCommit: Long = {