Skip to content

cassandra-stress doesn't support UDT in user-profile mode #332

Open
@yarongilor

Description

@yarongilor

Creating a UDT and using it in a table schema is not supported by cassandra-stress user-profile mode.
This ability is required for testing specific user-profiles, similar to what is used by customers.

A Dtest for that failed like:
Using a user-profile table schema of:

table_definition: |
  CREATE TABLE IF NOT EXISTS user_with_ck (
    key blob,
    // Case sensitive column names
    //"Md5" text,
    md5 text,
    ...
    hash_bashname hash_and_basename,
    PRIMARY KEY (key, md5)
  ); 

The following code:

        with self.patient_cql_connection(node) as session:
            create_ks(session=session, name='keyspace_complex', rf=3)
            session.execute("CREATE TYPE IF NOT EXISTS hash_and_basename (md5 text, basename text)")
            wait_for_schema_agreement(session)
        time.sleep(30)
        logger.debug('Running stress ...')
        node.stress(["user", "no-warmup", "profile=%s" % os.path.realpath('test_data/batch-test/complex_schema.yaml'),
        ...

Failed with:

E           stderr: java.lang.UnsupportedOperationException: Because of this name: hash_bashname if you removed it from the yaml and are still seeing this, make sure to drop table

It got a similar failure testing in SCT:

< t:2023-06-01 14:03:34,429 f:common.py       l:1742 c:utils                p:DEBUG > Executing CQL 'CREATE TYPE IF NOT EXISTS custom_d1.post_speaker_item (id3 bigint, name3 text, reaction_type3 tinyint);' ...
< t:2023-06-01 14:03:34,434 f:thread.py       l:52   c:cassandra.cluster    p:DEBUG > Refreshing schema in response to schema change. {'target_type': 'TYPE', 'change_type': 'CREATED', 'keyspace': 'custom_d1', 'type': 'post_speaker_item'}
Stress command completed with bad status 1: WARNING: Table 'posts' has column 'speaker_map' of unsupported type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions