datastrato / gravitino

World's most powerful open data catalog for building a high-performance, geo-distributed and federated metadata lake.
https://datastrato.ai/docs/
Apache License 2.0
654 stars 199 forks source link

[Bug report] Gravitino-trino-connector don't work with Trino-435 worker #2428

Open theoryxu opened 3 months ago

theoryxu commented 3 months ago

Version

main branch

Describe what's wrong

When the node is a worker rather than a coordinator, there are some error and the node can't start.

image

Error message and/or stacktrace

image

How to reproduce

0.4.0

Additional context

related to https://github.com/datastrato/gravitino/issues/2376

theoryxu commented 3 months ago

@diqiu50 Hi, will this issue also be fixed in 0.5.0?

diqiu50 commented 3 months ago

Yes

diqiu50 commented 3 months ago

@theoryxu
I attempted to start our gravitino-trino-connector on a worker, but it was unsuccessful. The reason is that our current catalog injection mechanism relies on finding the catalogChanger instance within the Trino ConnectorContext object, which cannot be located in worker mode.

After my testing, if the worker is configured to operate in a coordinator+worker mode, it can function properly. Although these worker nodes are configured with a coordinator, in reality, it does not work, because the discovery.uri configured on all workers points to the actual coordinator.

An alternative solution would require modifying the Trino source code, which would complicate the deployment process.