flume-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roshan Naik (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLUME-2965) race condition in SpillableMemoryChannel log print
Date Wed, 03 Aug 2016 23:44:20 GMT

    [ https://issues.apache.org/jira/browse/FLUME-2965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15406832#comment-15406832
] 

Roshan Naik commented on FLUME-2965:
------------------------------------

Thanks [~lqp276]
Took a quick look... and in general it looks like the right fix. Would be easier to idenitify
all the changes in this fix if just the diff/patch was uploaded.  Also please create a code
review as suggested by Denes.

> race condition in SpillableMemoryChannel log print
> --------------------------------------------------
>
>                 Key: FLUME-2965
>                 URL: https://issues.apache.org/jira/browse/FLUME-2965
>             Project: Flume
>          Issue Type: Bug
>          Components: Channel
>    Affects Versions: v1.7.0
>            Reporter: liqiaoping
>            Priority: Minor
>         Attachments: SpillableMemoryChannel.java
>
>
> use SpillableMemoryChannel with http blob handler, and send many request concurrently,
As the jetty has a threadpool to handle incoming request, the commit to SpillableMemoryChannel
will be concurrent.
> the Following code :
>     @Override
>     protected void doCommit() throws InterruptedException {
>       if (putCalled) {
>         putCommit();
>         if (LOGGER.isDebugEnabled()) {
>           LOGGER.debug("Put Committed. Drain Order Queue state : "
>                   + drainOrder.dump());
>         }
> in method - >drainOrder.dump() will iterate its internal queue,  in the meantime,
has changed by other thread, thus throw a concurrent modification exception. thus will result
the channel processor try to rollback, but actually the transaction has commit succefully.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message