cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sylvain Lebresne (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CASSANDRA-2454) Possible deadlock for counter mutations
Date Tue, 12 Apr 2011 10:14:05 GMT

     [ https://issues.apache.org/jira/browse/CASSANDRA-2454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Sylvain Lebresne updated CASSANDRA-2454:
----------------------------------------

    Attachment: 0001-Submit-counters-update-on-mutation-stage-only-if-not.patch

Looking closer that this there is 2 places from which we execute counter write:
  # if the coordinator is a replica, from the thrift thread.
  # otherwise in the CounterMutationVerbHandler on a replica, that is on the MUTATION stage.

In the latter case, we must indeed avoid re-submitting to the MUTATION stage to avoid deadlock.
But in the former we should not skip the stage.

Attaching a v2 patch that distinguishes between the 2 cases and 'do the right thing'.

Note that another way to fix this would be to make CounterMutationVerbHandler execute on some
other stage that the MUTATION one. Even though that would simpler in the number of line modified,
I don't think an existing stage would fit the bill and creating a new one for that doesn't
feel right.

> Possible deadlock for counter mutations
> ---------------------------------------
>
>                 Key: CASSANDRA-2454
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-2454
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Stu Hood
>             Fix For: 0.8
>
>         Attachments: 0001-Don-t-re-submit-to-the-mutation-stage.txt, 0001-Submit-counters-update-on-mutation-stage-only-if-not.patch
>
>
> {{StorageProxy.applyCounterMutation}} is executed on the mutation stage, but it also
submits tasks to the mutation stage, and then blocks for them. If there are more than a few
concurrent mutations, this can lead to deadlock.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message