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

Benedict edited comment on CASSANDRA-14742 at 9/26/18 11:20 AM:
----------------------------------------------------------------

Patch looks good overall, just a few nits:

# Right now, {{ReplicaPlans}} is organised into counter writes, regular writes, 
regular write utilities, reads, reads utilities; I think it would be cleanest 
to keep the batch write utilities similarly proximal to the batch writes 
themselves, for consistency
# {{syncWriteBatchedMutations}} and {{forBatchlogWrite}} each accept a 
{{localDc}} parameter - this seems a bit weird, since it's a global variable, 
and only ever invoked with this (but also, we obtain it inconsistently, by 
asking the snitch instead of the cached {{localDc}}.  Perhaps they should each 
just use the latter, without requiring it as a parameter?  (I realise this is 
pre-existing)
# Unused imports in {{ReplicaPlans}}


was (Author: benedict):
Patch looks good overall, just a few nits:

# Right now, {{ReplicaPlans}} is organised into counter writes, regular writes, 
regular write utilities, reads, reads utilities; I think it would be cleanest 
to keep the batch write utilities similarly proximal to the batch writes 
themselves, for consistency
# {{syncWriteBatchedMutations}} and {{forBatchlogWrite}} each accept a 
{{localDc}} parameter - this seems a bit weird, since it's a global variable, 
and only ever invoked with this (but also, we obtain it inconsistently, by 
asking the snitch instead of the cached {{localDc}}.  Perhaps they should each 
just use the latter, without requiring it as a parameter?
# Unused imports in {{ReplicaPlans}}

> Race Condition in batchlog replica collection
> ---------------------------------------------
>
>                 Key: CASSANDRA-14742
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-14742
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Alex Petrov
>            Assignee: Alex Petrov
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When we collect nodes for it in {{StorageProxy#getBatchlogReplicas}}, we 
> already filter out down replicas; subsequently they get picked up and taken 
> for liveAndDown.
> There's a possible race condition due to picking tokens from token metadata 
> twice (once in {{StorageProxy#getBatchlogReplicas}} and second one in 
> {{ReplicaPlan#forBatchlogWrite}})



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to