cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoffrey Yu (JIRA)" <>
Subject [jira] [Updated] (CASSANDRA-12106) Add ability to blacklist a CQL partition so all requests are ignored
Date Tue, 19 Jul 2016 21:04:20 GMT


Geoffrey Yu updated CASSANDRA-12106:
    Fix Version/s: 4.x
           Status: Patch Available  (was: Open)

I’ve attached a patch that implements this. There are a lot of changes, so I thought I’d
highlight the high level approach I took to make it easier to understand what is going on.

This patch will let us blacklist any particular CQL partition, scoped by keyspace and table.
Any reads/writes to a blacklisted partition will be rejected, and the client will receive
a Read/WriteRejectedException accordingly. The mechanism for blacklisting a partition is exposed
through a node tool command.

The approach to implementing this is to perform the rejection at the data replica level. This
is so each node only needs to be aware of blacklisted partitions for ranges that it owns,
allowing this to scale to larger clusters. The blacklist is stored in a new table under the
{{system_distributed}} keyspace. Each node then maintains an in memory cache to store blacklist
entries corresponding to its token ranges.

For single partition reads and writes, we reject the request as long as one replica responds
with a rejection.

For partition range reads, we reject the request if there is a blacklisted partition within
the range. 

CAS writes are rejected by the data nodes only on the prepare/promise step, and potentially
when the coordinator performs the read before the propose/accept step. If the write proceeds
past these places, the mutation will be allowed to be applied. 

A mutation in a batch log that is rejected will not be considered a "failure" in the replay.
This means if all mutations were either applied successfully or rejected, then the replay
would be considered successful and the batch log would be deleted.

Mutations that are rejected are not hinted. Any hints that are rejected when they are attempted
to be applied will still be considered "successful" and deleted.

There are also changes included to help cover cache consistency when a node starts up, undergoes
a range movement, and if it is decommissioned.

> Add ability to blacklist a CQL partition so all requests are ignored
> --------------------------------------------------------------------
>                 Key: CASSANDRA-12106
>                 URL:
>             Project: Cassandra
>          Issue Type: New Feature
>            Reporter: Geoffrey Yu
>            Assignee: Geoffrey Yu
>            Priority: Minor
>             Fix For: 4.x
>         Attachments: 12106-trunk.txt
> Sometimes reads/writes to a given partition may cause problems due to the data present.
It would be useful to have a manual way to blacklist such partitions so all read and write
requests to them are rejected.

This message was sent by Atlassian JIRA

View raw message