Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cassandra schema bootstrap fails when applying the migration 1.0 to the intial schema #2551

Closed
vaclavbroz opened this issue Feb 25, 2022 · 3 comments
Assignees

Comments

@vaclavbroz
Copy link
Contributor

Expected Behavior

Temporal bootstraps Cassandra schema.

Actual Behavior

The initial schema is created but then the first migration at:
https://github.com/temporalio/temporal/blob/30c89b9f91dafc13d2d75fda266d81ce8bc72f3e/schema/cassandra/temporal/versioned/v1.0/schema.cql
fails probably because of syntax:

CREATE TYPE serialized_event_batch (
  encoding_type text,
  version       int,
  data          blob,
);

has one comma at the end while the syntax should be:
https://docs.datastax.com/en/cql-oss/3.3/cql/cql_reference/cqlCreateType.html

Steps to Reproduce the Problem

  1. Clone the docker-compose repo version 1.13
  2. Select the Cassandra version in config
  3. Bring it up

Specifications

  • Version: 1.13 docker-compose repo
@vaclavbroz
Copy link
Contributor Author

temporal                | 2022-02-25T22:16:44.483Z      INFO    Processing schema file: /etc/temporal/schema/cassandra/temporal/versioned/v1.6/cluster_metadata_info.cql   {"logging-call-at": "updatetask.go:232"}
temporal                | 2022-02-25T22:16:44.483Z      DEBUG   ---- Executing updates for version 1.0 ----     {"logging-call-at": "updatetask.go:150"}
temporal                | 2022-02-25T22:16:44.483Z      DEBUG   CREATE TYPE serialized_event_batch (encoding_type text,version int,data blob,);    {"logging-call-at": "updatetask.go:152"}
temporal                | 2022-02-25T22:16:44.552Z      ERROR   Unable to update CQL schema.    {"error": "error executing statement:line 1:92 no viable alternative at input ') (... (encoding_type text,version       int,data          blob,)...)", "logging-call-at": "handler.go:82"}
t

@yiminc
Copy link
Member

yiminc commented Feb 25, 2022

I have never encounter this issue. What version of Cassandra are you using?

@vaclavbroz
Copy link
Contributor Author

Azure CosmoDB Cassandra API. But it's inline with the specs see above, there should not be any trailing comma in the list of fields.

yiminc pushed a commit that referenced this issue Feb 26, 2022
* #2551 Fixing syntax in first migration to the Cassandra schema

See #2551

* Removed superfluous comma in temporal schema
@yiminc yiminc closed this as completed Feb 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants