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

Datastore migrations mismatch with the Trino cluster resource manager db #637

Open
michael-layfer opened this issue Mar 3, 2025 · 1 comment

Comments

@michael-layfer
Copy link

michael-layfer commented Mar 3, 2025

Using the latest version 14 of Trino Gateway the flyway migration creates a single migration based on this: V1__create_schema.

Which breaks the Trino cluster resource manager db migrations - casuing the Trino clsuter to fail on start.

Workaround:

  1. Start Trino cluster first, letting it apply its migrations on the shared resource manager db.
  2. Create the missing Trino GW tables:
CREATE TABLE IF NOT EXISTS gateway_backend (
name VARCHAR(256) PRIMARY KEY,
routing_group VARCHAR (256),
backend_url VARCHAR (256),
external_url VARCHAR (256),
active BOOLEAN
);

CREATE TABLE IF NOT EXISTS query_history (
query_id VARCHAR(256) PRIMARY KEY,
query_text VARCHAR (256),
created bigint,
backend_url VARCHAR (256),
user_name VARCHAR(256),
source VARCHAR(256)
);
CREATE INDEX IF NOT EXISTS query_history_created_idx ON query_history(created);
  1. Configure Trino GW to skip migration run:
    runMigrationsEnabled: false
  2. Start Trino GW
@willmostly
Copy link
Contributor

Do you use the resource group functionality in the Trino Gateway? We were considering it for removal, so it would be good to know if it is being actively used

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants