What happens if the disc is full during recording in Cassandra?

When storing records in cassandra (half of the saved records), if my disk is full and there is no space, what will happen? If any exception is thrown, what is the exception?

Scenario two: what if I create a new keyspace while my disk is full? If any exception is thrown, what is the exception?

+4
source share
3 answers

If the disk becomes full, it stops its execution. I tried all this many times, stopping its execution. This way your api client throws a connection rejected exception.

+1
source

It depends on whether you created the key space with durable_writes = true or false (true - by default).

If it is filled first with your commitlog file, then when writing to commitlog (but does not return as part of the response), an IOException will be thrown and the request will be disconnected.

If the latter and your data disks are full, you will receive a successful response. But memtable, which cannot move to disk, will continue to grow until the entire node exits RAM and ends.

In the second scenario, when an attempt is made to write to a transaction log or when trying to reset a new scheme to a disk, an exception is thrown depending on which disk is full. In both cases, the request will be disconnected.

The upcoming Cassandra 1.2 (currently in beta) improves the handling of such cases - read Handling Disk Failures in Cassandra 1.2 for details.

+6
source

I think you will get a timeout exception. I just ran into this while trying to upload data to a host with low disk space.

0
source

Source: https://habr.com/ru/post/1436785/


All Articles