Error: unconfigured table open_executions

Hello !, at the moment of executing

./cadence --do samples-domain workflow run --tl helloWorldGroup --wt main.Workflow --et 60 -i '"cadence"'

I am getting the error:

{Message: RecordWorkflowExecutionClosed operation failed. Error: unconfigured table open_executions}"

I am checking my cassandra:

        cassandra@cqlsh:cadence_visibility> describe cadence_visibility;

    CREATE KEYSPACE cadence_visibility WITH replication = {'class': 'SimpleStrategy', 'replication_factor': '3'}  AND durable_writes = true;

    CREATE TABLE cadence_visibility.open_executions (
        domain_id uuid,
        domain_partition int,
        start_time timestamp,
        run_id uuid,
        encoding text,
        execution_time timestamp,
        memo blob,
        task_list text,
        workflow_id text,
        workflow_type_name text,
        PRIMARY KEY ((domain_id, domain_partition), start_time, run_id)
    ) WITH CLUSTERING ORDER BY (start_time DESC, run_id ASC)
        AND bloom_filter_fp_chance = 0.1
        AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
        AND comment = ''
        AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy', 'tombstone_threshold': '0.6'}
        AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
        AND crc_check_chance = 1.0
        AND dclocal_read_repair_chance = 0.1
        AND default_time_to_live = 0
        AND gc_grace_seconds = 60
        AND max_index_interval = 2048
        AND memtable_flush_period_in_ms = 0
        AND min_index_interval = 128
        AND read_repair_chance = 0.0
        AND speculative_retry = '99PERCENTILE';
    CREATE INDEX open_by_workflow_id ON cadence_visibility.open_executions (workflow_id);
    CREATE INDEX open_by_type ON cadence_visibility.open_executions (workflow_type_name);

    CREATE TABLE cadence_visibility.closed_executions_v2 (
        domain_id uuid,
        domain_partition int,
        close_time timestamp,
        run_id uuid,
        encoding text,
        execution_time timestamp,
        history_length bigint,
        memo blob,
        start_time timestamp,
        status int,
        task_list text,
        workflow_id text,
        workflow_type_name text,
        PRIMARY KEY ((domain_id, domain_partition), close_time, run_id)
    ) WITH CLUSTERING ORDER BY (close_time DESC, run_id ASC)
        AND bloom_filter_fp_chance = 0.1
        AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
        AND comment = ''
        AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
        AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
        AND crc_check_chance = 1.0
        AND dclocal_read_repair_chance = 0.1
        AND default_time_to_live = 0
        AND gc_grace_seconds = 172800
        AND max_index_interval = 2048
        AND memtable_flush_period_in_ms = 0
        AND min_index_interval = 128
        AND read_repair_chance = 0.0
        AND speculative_retry = '99PERCENTILE';
    CREATE INDEX closed_by_close_time_v2 ON cadence_visibility.closed_executions_v2 (close_time);
    CREATE INDEX closed_by_type_v2 ON cadence_visibility.closed_executions_v2 (workflow_type_name);
    CREATE INDEX closed_by_workflow_id_v2 ON cadence_visibility.closed_executions_v2 (workflow_id);
    CREATE INDEX closed_by_status_v2 ON cadence_visibility.closed_executions_v2 (status);

    CREATE TABLE cadence_visibility.closed_executions (
        domain_id uuid,
        domain_partition int,
        start_time timestamp,
        run_id uuid,
        close_time timestamp,
        encoding text,
        execution_time timestamp,
        history_length bigint,
        memo blob,
        status int,
        task_list text,
        workflow_id text,
        workflow_type_name text,
        PRIMARY KEY ((domain_id, domain_partition), start_time, run_id)
    ) WITH CLUSTERING ORDER BY (start_time DESC, run_id ASC)
        AND bloom_filter_fp_chance = 0.1
        AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
        AND comment = ''
        AND compaction = {'class': 'org.apache.cassandra.db.compaction.LeveledCompactionStrategy'}
        AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
        AND crc_check_chance = 1.0
        AND dclocal_read_repair_chance = 0.1
        AND default_time_to_live = 0
        AND gc_grace_seconds = 172800
        AND max_index_interval = 2048
        AND memtable_flush_period_in_ms = 0
        AND min_index_interval = 128
        AND read_repair_chance = 0.0
        AND speculative_retry = '99PERCENTILE';
    CREATE INDEX closed_by_workflow_id ON cadence_visibility.closed_executions (workflow_id);
    CREATE INDEX closed_by_status ON cadence_visibility.closed_executions (status);
    CREATE INDEX closed_by_type ON cadence_visibility.closed_executions (workflow_type_name);
    CREATE INDEX closed_by_close_time ON cadence_visibility.closed_executions (close_time);
1 Like

I would recommend running Temporal and Cadence using docker-compose unless you are developing features for the service itself.

1 Like

I understand, as I told you about slack, I made some modifications to be able to connect to a cassandra, giving user and password that I did not receive.

1 Like

What commands did you execute to provision schema?

./cadence-cassandra-tool --ep myhost create -k cadence --rf 1
./cadence-cassandra-tool --ep myhost -k cadence setup-schema -v 0.0
./cadence-cassandra-tool --ep myhost create -k cadence_visibility --rf 1
./cadence-cassandra-tool --ep myhost -k cadence_visibility setup-schema -v 0.0

The first two run without problem, while the last two I always receive the error

Cannot add already existing table "schema_version" to keyspace "cadence"

Apparently still running cadence schema.cql and not cadence_visibility