Git Product home page Git Product logo

Comments (5)

lambrospetrou avatar lambrospetrou commented on September 16, 2024

I can provide a PR to fix this as long as we decide on which of the two solutions you would like to use. Maybe @mosabua can chime in with a preference or route to the right folks?

from trino-gateway.

wewark avatar wewark commented on September 16, 2024

Hello, any ETA for this? It seems like even setting externalUrl to the gateway URL has no effect. It is probably using the backend URL anyway https://github.com/trinodb/trino-gateway/blob/49c5c82dbc18a50b9104d001917dc3139088a0da/webapp/src/components/history.tsx#L57C30-L57C47

from trino-gateway.

oneonestar avatar oneonestar commented on September 16, 2024

This issue is a bit complicated. Currently, we only store the backend_url in the query history table. Both backend_url and external_url can change at any time. This can lead to problems when the URLs are changed and the old backend_url in the query history no longer matches with the current setting.

Storing the foreign key gateway_backend.name in the query history table could solve the issue. We can get the latest backend_url and external_url for the cluster. For audit and debugging purposes, backend_url should also be kept for reference.

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)
);

from trino-gateway.

wewark avatar wewark commented on September 16, 2024

@oneonestar thanks for detailed response. Do we have any ETA for that fix?

from trino-gateway.

oneonestar avatar oneonestar commented on September 16, 2024

It requires a database schema update and we haven't done that before...
I can bring up this issue in the next dev meeting to see how we can handle it.

from trino-gateway.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.