Name | Status | Type | Time(s) |
test_altering_nonexistent_user_throws_exception | Success | | 31.302 |
test_authentication_handle_unavailable | Success | | 51.591 |
test_insertion_and_commitlog_behavior_after_reaching_cdc_total_space | Failure | Exception: WriteFailure expected
self = <cdc_test.TestCDC object at 0x7f3b47b8cbb0>
def test_insertion_and_commitlog_behavior_after_reaching_cdc_total_space(self):
"""
Test that C* behaves correctly when CDC tables have consumed all the
space available to them. In particular: after writing
cdc_total_space_in_mb MB into CDC commitlogs:
- CDC writes are rejected
- non-CDC writes are accepted
- on flush, CDC commitlogs are copied to cdc_raw
- on flush, non-CDC commitlogs are not copied to cdc_raw
This is a lot of behavior to validate in one test, but we do so to
avoid running multiple tests that each write 1MB of data to fill
cdc_total_space_in_mb.
"""
ks_name = 'ks'
full_cdc_table_info = TableInfo(
ks_name=ks_name, table_name='full_cdc_tab',
column_spec=_16_uuid_column_spec,
insert_stmt=_get_16_uuid_insert_stmt(ks_name, 'full_cdc_tab'),
options={'cdc': 'true'}
)
configuration_overrides = {
# Make CDC space as small as possible so we can fill it quickly.
'cdc_total_space_in_mb': 4,
}
node, session = self.prepare(
ks_name=ks_name,
configuration_overrides=configuration_overrides
)
session.execute(full_cdc_table_info.create_stmt)
# Later, we'll also make assertions about the behavior of non-CDC
# tables, so we create one here.
non_cdc_table_info = TableInfo(
ks_name=ks_name, table_name='non_cdc_tab',
column_spec=_16_uuid_column_spec,
insert_stmt=_get_16_uuid_insert_stmt(ks_name, 'non_cdc_tab')
)
session.execute(non_cdc_table_info.create_stmt)
# We'll also make assertions about the behavior of CDC tables when
# other CDC tables have already filled the designated space for CDC
# commitlogs, so we create the second CDC table here.
empty_cdc_table_info = TableInfo(
ks_name=ks_name, table_name='empty_cdc_tab',
column_spec=_16_uuid_column_spec,
insert_stmt=_get_16_uuid_insert_stmt(ks_name, 'empty_cdc_tab'),
options={'cdc': 'true'}
)
session.execute(empty_cdc_table_info.create_stmt)
# Here, we insert values into the first CDC table until we get a
# WriteFailure. This should happen when the CDC commitlogs take up 1MB
# or more.
logger.debug('flushing non-CDC commitlogs')
node.flush()
# Then, we insert rows into the CDC table until we can't anymore.
logger.debug('beginning data insert to fill CDC commitlogs')
rows_loaded = _write_to_cdc_write_failure(session, full_cdc_table_info.insert_stmt)
assert 0 < rows_loaded, ('No CDC rows inserted. This may happen when '
'cdc_total_space_in_mb > commitlog_segment_size_in_mb')
commitlog_dir = os.path.join(node.get_path(), 'commitlogs')
commitlogs_size = size_of_files_in_dir(commitlog_dir)
logger.debug('Commitlog dir ({d}) is {b}B'.format(d=commitlog_dir, b=commitlogs_size))
# We should get a WriteFailure when trying to write to the CDC table
# that's filled the designated CDC space...
try:
session.execute(full_cdc_table_info.insert_stmt)
> raise Exception("WriteFailure expected")
E Exception: WriteFailure expected
cdc_test.py:425: Exception | 26.883 |
test_changes_while_node_down | Skipped | awaiting CASSANDRA-10699
/home/cassandra/cassandra-dtest/concurrent_schema_changes_test.py:397: awaiting CASSANDRA-10699 | 0.000 |
test_conditional_deletes_on_static_columns_with_null_values | Success | | 34.798 |
test_14766 | Skipped | 5.1 > 4
/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 4 | 0.606 |
test_cleanup_when_no_replica_without_index | Success | | 38.899 |
test_single_partition_deletions | Success | | 38.671 |
test_complementary_deletion_with_limit_on_static_column_with_not_empty_partitions | Success | | 72.306 |
test_creating_and_dropping_uda | Success | | 21.712 |
test_ssl_enabled | Success | | 65.857 |
test_batch_mutate_standard_columns | Skipped | 5.1 > 4
/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 4 | 0.540 |
test_update_expiring | Skipped | 5.1 > 4
/home/cassandra/cassandra-dtest/conftest.py:468: 5.1 > 4 | 0.316 |
test_recover_negative_expiration_date_sstables_with_scrub | Success | | 48.821 |
test_client_warnings | Success | | 67.808 |
test_writing_with_token_boundaries | Success | | 50.402 |
test_sstable_repairedset | Success | | 111.930 |