You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by johnma14 <gi...@git.apache.org> on 2017/04/25 20:55:00 UTC

[GitHub] kafka pull request #2914: KAFKA-4994: Fix findbug warnings about OffsetStora...

GitHub user johnma14 opened a pull request:

    https://github.com/apache/kafka/pull/2914

    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


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/2914.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 #2914
    
----
commit d481c10818b59e67eaac0aa598e845773b07e51d
Author: Mariam John <ma...@us.ibm.com>
Date:   2017-04-25T20:47:04Z

    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.

----


---
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.
---

[GitHub] kafka pull request #2914: KAFKA-4994: Fix findbug warnings about OffsetStora...

Posted by johnma14 <gi...@git.apache.org>.
GitHub user johnma14 reopened a pull request:

    https://github.com/apache/kafka/pull/2914

    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


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/2914.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 #2914
    
----
commit d481c10818b59e67eaac0aa598e845773b07e51d
Author: Mariam John <ma...@us.ibm.com>
Date:   2017-04-25T20:47:04Z

    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.

----


---
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.
---

[GitHub] kafka pull request #2914: KAFKA-4994: Fix findbug warnings about OffsetStora...

Posted by johnma14 <gi...@git.apache.org>.
Github user johnma14 closed the pull request at:

    https://github.com/apache/kafka/pull/2914


---
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.
---