Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D4F29200C61 for ; Tue, 25 Apr 2017 18:55:00 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D38EF160BB3; Tue, 25 Apr 2017 16:55:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 268FC160B8E for ; Tue, 25 Apr 2017 18:55:00 +0200 (CEST) Received: (qmail 10376 invoked by uid 500); 25 Apr 2017 16:54:59 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 10335 invoked by uid 99); 25 Apr 2017 16:54:58 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Apr 2017 16:54:58 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id B220DDF999; Tue, 25 Apr 2017 16:54:58 +0000 (UTC) From: johnma14 To: dev@kafka.apache.org Reply-To: dev@kafka.apache.org Message-ID: Subject: [GitHub] kafka pull request #2913: Kafka-4994: Fix findbug warnings about OffsetStora... Content-Type: text/plain Date: Tue, 25 Apr 2017 16:54:58 +0000 (UTC) archived-at: Tue, 25 Apr 2017 16:55:01 -0000 GitHub user johnma14 opened a pull request: https://github.com/apache/kafka/pull/2913 Kafka-4994: Fix findbug warnings about OffsetStorageWriter OffsetStorageWriter is not a thread-safe class and should be accessed only from a Task's processing thread. The WorkerSourceTask class calls the different methods (offset, beginFlush, cancelFlush, handleFinishWrite) within a synchronized block. Hence the method definitions in OffsetStorageWriter.java does not need to contain the keyword synchronized again. In the OffsetStorageWriter.java class, the doFlush() method is not explicitely synchronized like the other methods in this class. Hence this can lead to inconsistent synchronization of variables like currentFlushId and toFlush which are set in the synchronized methods within this class. - https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/storage/OffsetStorageWriter.java - https://github.com/apache/kafka/blob/trunk/connect/runtime/src/main/java/org/apache/kafka/connect/runtime/WorkerSourceTask.java#L295 Closes bug: Kafka-4994 You can merge this pull request into a Git repository by running: $ git pull https://github.com/johnma14/kafka bug/kafka-4994 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/kafka/pull/2913.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #2913 ---- ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---