cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paulo Motta (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-13069) Local batchlog for MV may not be correctly written on node movements
Date Wed, 21 Dec 2016 23:39:58 GMT


Paulo Motta updated CASSANDRA-13069:
    Status: Patch Available  (was: Open)

Good catch! In the patch below I fixed this by writing a single batchlog for all non-local
mutations (remote as well as non-paired). If the batchlog contains non-paired mutations, it
will not receive acks and thus it will not be cleared.

I also removed the {{pendingEndpoints.isEmpty()}} condition to skip the batchlog for local
mutations, since this was a pre-CASSANDRA-10674 leftover when [ViewUtils.getViewNaturalEndpoint|]
returned the local address to force non-paired replicas to be written to the batchlog.

While fixing this I noticed that we don't decrement the {{BatchlogCleanup}} counter on local
mutations, so if there are both local and remote paired mutations the batchlog is never cleared.
This was reproduced on [this dtest|].
This might explain why [~brstgt] experienced multi-GB batchlogs when bootstrapping nodes with
multiple MVs on CASSANDRA-12905.

Patch and tests available below:

> Local batchlog for MV may not be correctly written on node movements
> --------------------------------------------------------------------
>                 Key: CASSANDRA-13069
>                 URL:
>             Project: Cassandra
>          Issue Type: Bug
>            Reporter: Sylvain Lebresne
>            Assignee: Paulo Motta
> Unless I'm really reading this wrong, I think the code [here|],
which comes from CASSANDRA-10674, isn't working properly.
> More precisely, I believe we can have both paired and unpaired mutations, so that both
{{if}} can be taken, but if that's the case, the 2nd write to the batchlog will basically
overwrite (remove) the batchlog write of the 1st {{if}} and I don't think that's the intention.
In practice, this means "paired" mutation won't be in the batchlog, which mean they won't
be replayed at all if they fail.

This message was sent by Atlassian JIRA

View raw message