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

T Jake Luciani commented on CASSANDRA-6477:
-------------------------------------------

bq. I've actually never understood why we do a batchlog update on the base 
table replicas (and so I think we should remove it, even though that's likely 
not the most costly one). Why do we need it? If my reasoning above is correct, 
the coordinator batchlog is enough to guarantee durability and eventual 
consistency because we will replay the whole mutation until a QUORUM of replica 
acknowledges success.

Yes, if we error out if the base is unable to replicate to the view then the 
second BL is redundant.  However there are a few reasons why we did what we did.

1. Your availability is cut in half when you use a MV with these guarantees.  I 
have a 5 node cluster RF=3 and I want to write at CL.ONE.  If I have an MV I 
can no longer handle two down nodes.  Since the paired replica for the one base 
node might be down.
2. The cost of replaying the coordinator BL is much higher than replaying the 
base to replica BL since the latter is 1:1.  

I do agree there is a disconnect in terms of consistency level when using the 
MV but the batchlog feature was written to handle this.   We could support both 
approaches in terms of a new flag?  Or are we willing to take a hit on 
availability?



> Materialized Views (was: Global Indexes)
> ----------------------------------------
>
>                 Key: CASSANDRA-6477
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-6477
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Carl Yeksigian
>              Labels: cql
>             Fix For: 3.0 beta 1
>
>         Attachments: test-view-data.sh, users.yaml
>
>
> Local indexes are suitable for low-cardinality data, where spreading the 
> index across the cluster is a Good Thing.  However, for high-cardinality 
> data, local indexes require querying most nodes in the cluster even if only a 
> handful of rows is returned.



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

Reply via email to