You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jonathan Ellis (JIRA)" <ji...@apache.org> on 2012/08/14 18:30:38 UTC

[jira] [Created] (CASSANDRA-4542) add atomic_batch_mutate method

Jonathan Ellis created CASSANDRA-4542:
-----------------------------------------

             Summary: add atomic_batch_mutate method
                 Key: CASSANDRA-4542
                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
             Project: Cassandra
          Issue Type: Sub-task
          Components: API, Core
            Reporter: Jonathan Ellis
            Assignee: Aleksey Yeschenko
             Fix For: 1.2


atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13443201#comment-13443201 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

Hmm, I think that's a vestige of when the coordinator was going to be responsible for replay.  With the batchlog replicas themselves handling replay it's no longer necessary.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4543-4544-v3.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-and-CASSANDRA-4544-v2.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4544.diff, CASSANDRA-4542-and-CASSANDRA-4544-v2.patch, CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446114#comment-13446114 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Attached a_b_m patch for review (4543 and 4544 changes aren't included here).
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-4543-4544.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456663#comment-13456663 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

bq. updated getBatchlogEndpoints to use TokenMetadata.Topology
This introduced a bug - you have to clone TokenMetadata to get the topology, or else getTopology() call throws an AssertionError (assert this != StorageService.instance.getTokenMetadata();).
Please apply GET-TOPOLOGY-FIX.patch and push as soon as you can. Otherwise abm works.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch, GET-TOPOLOGY-FIX.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451479#comment-13451479 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Also, with that sendMessages refactoring, batch write and batch remove add some overhead for single-node clusters - we don't just rm.apply() anymore.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451486#comment-13451486 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

I wouldn't mind adding an insertLocal path there, but optimizing atomic batches for single node clusters isn't a super high priority.  The extra commitlog write is going to dominate the extra work anyway.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13434248#comment-13434248 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

Summary of discussion from CASSANDRA-4285:

{code}
CREATE TABLE batchlog (
  coordinator inet,
  id          uuid,
  data        blob,
  PRIMARY KEY ((coordinator, shard))
) WITH gc_grace_seconds=0;
{code}

abm adds extra steps before and after writing a batch.

Before writing the batch (but *after* doing availability check against the FD for the row replicas): write the entire batch to a batchlog elsewhere in the cluster.

After: remove the batchlog entry (after writing hints for the batch rows, if necessary).

The batchlog itself should be defined with LocalStrategy.  Replay will be handled locally (CASSANDRA-4543).  Thus, we can't use the defined ReplicationStrategy when writing to the BL from StorageProxy; we should pick replicas manually:

- replicas should be in the local datacenter
- replicas should be alive according to the failure detector
- write to min(2, number of qualifying candiates above) batchlog nodes

Other notes:

- need to add an optimization to flush that if the memtable is older than gc_g_s, we should do an extra removeDeleted pass to avoid writing tombstones that are already obsolete.  this is crucial to keeping batchlog from becoming a new source of compaction pain.
- need acknowledged_by_batchlog boolean for TimedOutException; if we timeout during the BL write (which is always effective CL.ONE) then we should return acknowledged_by_batchlog=false, acknowledged_by=0; if we timeout *after* the BL write, we should return acknowledged_by_batchlog=true, acknowledged_by=-1
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4543-4544.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449392#comment-13449392 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

Can you split out the changes to TimedOutException?  I think if we can get that in before the 1.2.0 freeze, the rest will be okay for 1.2.1.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4543-4544-v3.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4544.diff
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4544.diff, CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451396#comment-13451396 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Also it might be good to force compaction at the end of batchlog replay, the way HHOM does it. And maybe to the replay more often than 10 minutes - it shouldn't be a heavy operation under normal circumstances.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4544.diff, CASSANDRA-4542-and-CASSANDRA-4544-v2.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4543-4544.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544.patch, CASSANDRA-4542-4543-4544.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13447719#comment-13447719 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Batchlog columnfamily currently lives in System KS. Moving it to a separate KS would allow disabling commitlog for batchlog writes, but I'm not sure that's a good idea.
Also, I probably shouldn't wait for writes to complete in StorageProxy#removeFromBatchlog (should remove handler.get() call).
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4544.diff, CASSANDRA-4542-and-CASSANDRA-4544-v2.patch, CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-and-CASSANDRA-4544-v2.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-4544.diff)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-and-CASSANDRA-4544-v2.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451396#comment-13451396 ] 

Aleksey Yeschenko edited comment on CASSANDRA-4542 at 9/9/12 6:21 AM:
----------------------------------------------------------------------

Also it might be good to force compaction at the end of batchlog replay, the way HHOM does it. And maybe to replay more often than 10 minutes - it shouldn't be a heavy operation under normal circumstances.
                
      was (Author: iamaleksey):
    Also it might be good to force compaction at the end of batchlog replay, the way HHOM does it. And maybe to the replay more often than 10 minutes - it shouldn't be a heavy operation under normal circumstances.
                  
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445012#comment-13445012 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

It is not safe, so they should not be allowed in the batch.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-4543-4544-v3.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446397#comment-13446397 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

CASSANDRA-4542-4544.diff contains to commits - the one previously attached here, #4544, and adds atomic_batch_commit to thrift interface.
What's missing (from this patch): 4543, flush optimization.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4544.diff, CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-4542:
--------------------------------------

    Attachment: 4542-diff.txt

Nice work, I think we're almost done!

I've attached a diff with a couple minor changes:

- moves availability check into mutateAtomically
- handles batchlog targets being unavailable

unsure what changes to sendToHintedEndpoints are doing.  if this is just refactoring for clarity let's back that out for a separate patch.

The big change I think we still need is, batchlog writes shouldn't be doing hinted writes; if we can't write to the batchlog, too bad, we ignore it and move on.  No sense in replaying a hint later, after the write itself has probably succeeded.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451473#comment-13451473 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

You should also run thrift codegen to add abm.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: GET-TOPOLOGY-FIX.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch, GET-TOPOLOGY-FIX.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451490#comment-13451490 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Right.
Can you please comment on flush optimization?
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-4542:
--------------------------------------

    Attachment: 4542-v4.txt

v4 attached that refactors unhinted writes for batchlog to not go through the entire MultiMap business that full sendToHintedEndpoints does.

to-do:
- update getBatchlogEndpoints to not include local node, unless it's the only node in the DC
- update batchlog replay to only wait RING_DELAY before first replay instead of 10 minutes
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13442820#comment-13442820 ] 

Aleksey Yeschenko edited comment on CASSANDRA-4542 at 8/28/12 11:03 AM:
------------------------------------------------------------------------

re: schema

Didn't get to implementing #4543 yet - maybe coordinator column will be relevant there, but so far it seems like simple (id uuid PRIMARY KEY, data blob) batchlog table should've been enough - I'm writing it (coordinator column) but not reading anywhere.

                
      was (Author: iamaleksey):
    re: schema

Didn't get to implementing #4543 yet - maybe coordinator column will be relevant there, but so far it seems like simple (id uuid PRIMARY KEY, data blob) batchlog table should've been enough - I'm not writing it but not using it.

                  
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-4543-4544.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13442820#comment-13442820 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

re: schema

Didn't get to implementing #4543 yet - maybe coordinator column will be relevant there, but so far it seems like simple (id uuid PRIMARY KEY, data blob) batchlog table should've been enough - I'm not writing it but not using it.

                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13449414#comment-13449414 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

Sorry, didn't look at the patch closely.  Never mind.  (It's just thrift codegen changes for optional acknowledged_by_batchlog field.)
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-4543-4544-v2.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: 4542-v5.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446280#comment-13446280 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

The method hasn't been added to thrift yet. Will be in a separate patch.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451476#comment-13451476 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

done.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4543-4544-v3.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Sylvain Lebresne (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13456839#comment-13456839 ] 

Sylvain Lebresne commented on CASSANDRA-4542:
---------------------------------------------

Committed in f1aec3d.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch, GET-TOPOLOGY-FIX.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jonathan Ellis updated CASSANDRA-4542:
--------------------------------------

    Fix Version/s:     (was: 1.2.0)
                   1.2.1
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Comment Edited] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446397#comment-13446397 ] 

Aleksey Yeschenko edited comment on CASSANDRA-4542 at 9/1/12 8:35 AM:
----------------------------------------------------------------------

CASSANDRA-4542-4544.diff contains two commits - the one previously attached here, #4544, and adds atomic_batch_commit to thrift interface.
What's missing (from this patch): 4543, flush optimization.
                
      was (Author: iamaleksey):
    CASSANDRA-4542-4544.diff contains to commits - the one previously attached here, #4544, and adds atomic_batch_commit to thrift interface.
What's missing (from this patch): 4543, flush optimization.
                  
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4544.diff, CASSANDRA-4542.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment: CASSANDRA-4542-4543-4544-v2.patch
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: CASSANDRA-4542-4543-4544-v2.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Updated] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Yeschenko updated CASSANDRA-4542:
-----------------------------------------

    Attachment:     (was: CASSANDRA-4542-4543-4544-v3.patch)
    
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451150#comment-13451150 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Attached v5.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13445002#comment-13445002 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Is it safe to replay counter mutations? If not, should they even be allowed as part of the batch?
I currently don't serialize them to the batchlog, only saving RowMutations. Am I right about this?
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Aleksey Yeschenko (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451394#comment-13451394 ] 

Aleksey Yeschenko commented on CASSANDRA-4542:
----------------------------------------------

Had a look at possibility of flush optimization. Not sure in can be done in a clean way.

Memtable#writeSortedContents already has an optimization for cf-level deletions - it won't write the obsolete columns, only the cf-level tombstone.
As the comment in there says, it's not safe to not write the tombstone even if it's already past the gc grace period (the row might have columns in other sstables and they won't be removed at compaction if we never write the cf-tombstone).
It can only be omitted if we know for sure that there are no columns for this row in any sstables and it's a tricky thing, esp. when you count in remote nodes.

There is a different way though. batchlog is local and each write comes with a new random uuid as key. So if there is a row in the memtable then we know that there are no columns for the row in any sstables and can safely dismiss the tombstone write as well - this will require some API changes to CFS/Memtable though. 

                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (CASSANDRA-4542) add atomic_batch_mutate method

Posted by "Jonathan Ellis (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/CASSANDRA-4542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13451493#comment-13451493 ] 

Jonathan Ellis commented on CASSANDRA-4542:
-------------------------------------------

Would still prefer to address in CASSANDRA-4565.
                
> add atomic_batch_mutate method
> ------------------------------
>
>                 Key: CASSANDRA-4542
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-4542
>             Project: Cassandra
>          Issue Type: Sub-task
>          Components: API, Core
>            Reporter: Jonathan Ellis
>            Assignee: Aleksey Yeschenko
>             Fix For: 1.2.0 beta 1
>
>         Attachments: 4542-diff.txt, 4542-v4.txt, 4542-v5.patch, CASSANDRA-4542-4543-4544-v3.patch
>
>
> atomic_batch_mutate will have the same parameters as batch_mutate, but will write to the batchlog before attempting distribution to the batch rows' replicas.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira