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

SHOW TABLES query times out after a minute #857

Open
zaychenko-sergei opened this issue Sep 26, 2024 · 0 comments · Fixed by #941
Open

SHOW TABLES query times out after a minute #857

zaychenko-sergei opened this issue Sep 26, 2024 · 0 comments · Fixed by #941
Assignees
Labels
performance rust Pull requests that update Rust code

Comments

@zaychenko-sergei
Copy link
Contributor

zaychenko-sergei commented Sep 26, 2024

Depends on #986.

Note: after key blocks from #986 are implemented, this problem will unlikely need anything else specifically, but still should be tested and re-measured.


Open a random dataset in demo environment, and queried show tables.
The query fails after 1 minutes with a server timeout:

image

Grafana tracing shows numerous schema queries for every dataset:

image

followed by endless repository read iterations:

image

Assuming this is caused with the following code fragment, that simply looks for SetDataSchema event in every dataset:

    #[tracing::instrument(level="info", skip_all, fields(dataset_handle = ?self.dataset_handle))]
    async fn init_table_schema(&self) -> Result<SchemaRef, InternalError> {
        let maybe_set_data_schema = self
            .dataset
            .as_metadata_chain()
            .accept_one(SearchSetDataSchemaVisitor::new())
            .await
            .int_err()?
            .into_event();

        if let Some(set_data_schema) = maybe_set_data_schema {
            set_data_schema.schema_as_arrow().int_err()
        } else {
            Ok(Arc::new(Schema::empty()))
        }
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performance rust Pull requests that update Rust code
Projects
None yet
1 participant