[
https://issues.apache.org/jira/browse/CASSANDRA-9673?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14717556#comment-14717556
]
Aleksey Yeschenko commented on CASSANDRA-9673:
----------------------------------------------
I got rid of {{BatchResponse}} and siwtched to just {{WriteReponse}}, which I
made use a singleton instance of {{WriteResponse}}. We can't/shouldn't cache
the message itself for batch responses, though (unlike with hints, where we
can), because that has consequences for tracing (metadata in headers is
per-message).
A few more things:
- {{BatchCallback::onFailure}} shouldn't just signal - it masks failure
- {{LegacyBatchlogMigrator}} should log at {{INFO}}, conditional on legacy
batchlog table being empty
- {{LegacyBatchlogMigrator}} should try and calculate page size from sstable
stats (like {{LegacyHintsMigrator}})
Nit: {{StorageProxy.BatchlogEndpoints}} constructor is using {{forEach}} for no
apparent reason. Just use a for-loop there. Plus, {{this}} references there are
redundant and thus against our code style.
I feel like I'm starting to lose focus here. I think we are in a good state and
ready to commit once those are addressed - you've done a good job. So let's
just do that, and I'll create follow-up JIRAs if necessary.
> Improve batchlog write path
> ---------------------------
>
> Key: CASSANDRA-9673
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9673
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Aleksey Yeschenko
> Assignee: Stefania
> Labels: performance
> Fix For: 3.0 beta 2
>
> Attachments: 9673_001.tar.gz, 9673_004.tar.gz,
> gc_times_first_node_patched_004.png, gc_times_first_node_trunk_004.png
>
>
> Currently we allocate an on-heap {{ByteBuffer}} to serialize the batched
> mutations into, before sending it to a distant node, generating unnecessary
> garbage (potentially a lot of it).
> With materialized views using the batchlog, it would be nice to optimise the
> write path:
> - introduce a new verb ({{Batch}})
> - introduce a new message ({{BatchMessage}}) that would encapsulate the
> mutations, expiration, and creation time (similar to {{HintMessage}} in
> CASSANDRA-6230)
> - have MS serialize it directly instead of relying on an intermediate buffer
> To avoid merely shifting the temp buffer to the receiving side(s) we should
> change the structure of the batchlog table to use a list or a map of
> individual mutations.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)