cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Brown (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CASSANDRA-11116) Gossiper#isEnabled is not thread safe
Date Fri, 05 Feb 2016 19:29:40 GMT

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

Jason Brown edited comment on CASSANDRA-11116 at 2/5/16 7:29 PM:
-----------------------------------------------------------------

[~aweisberg] does adding {{volatile}} have an affect on publication when changes internal
to {{scheduledGossipTask}} occur, or only when the {{scheduledGossipTask}} variable itself
is updated? In {{Gossiper#stop}}, we call {{scheduledGossipTask.cancel(false);}}.

Either way, we need the {{volatile}} when (re-)starting Gossip ({{Gossiper#start()}}), but
I'm not sure we solve the problem on stopping gossip.


was (Author: jasobrown):
[~aweisberg] does adding {{volatile}} have an affect on publication when changes internal
to {{scheduledGossipTask}} occur, or only when the {{scheduledGossipTask}} variable itself
is updated? In {{Gossiper#stop}}, we call {{scheduledGossipTask.cancel(false);}}.

Either way, we need the {{volatile}} when (re-)starting Gossip ({{Gossiper#start()}}, but
I'm not sure we solve the problem on stopping gossip.

> Gossiper#isEnabled is not thread safe
> -------------------------------------
>
>                 Key: CASSANDRA-11116
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-11116
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Core
>            Reporter: Sergio Bossa
>            Assignee: Ariel Weisberg
>            Priority: Critical
>
> {{Gossiper#isEnabled()}} relies on the presence of {{scheduledGossipTask}}, which is
not final nor volatile. As a consequence, when such method is called on a different thread,
i.e. the gossip stage thread, it is sometimes detected as not enabled, causing particularly
obscure failures.
> This is shown by the following logs. First the gossiper is started:
> {noformat}
> 1 TRACE [Thread-29] 2016-02-03 19:21:31,232  Gossiper.java (line 1310) gossip started
with generation 1454527291
> {noformat}
> Then the same node misses a gossip message because the gossiper is seen as disabled:
> {noformat}
> 1 TRACE [GossipStage:1] 2016-02-03 19:21:32,016  GossipDigestSynVerbHandler.java (line
44) Ignoring GossipDigestSynMessage because gossip is disabled
> {noformat}



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

Mime
View raw message