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

Unable to query optimizer_rule_stats table #8700

Closed
posulliv opened this issue Jul 28, 2021 · 2 comments · Fixed by #9237
Closed

Unable to query optimizer_rule_stats table #8700

posulliv opened this issue Jul 28, 2021 · 2 comments · Fixed by #9237
Labels
bug Something isn't working
Milestone

Comments

@posulliv
Copy link
Contributor

Attempting to query the system.runtime.optimizer_rule_stats table results in the following error:

trino:runtime> select * from optimizer_rule_stats;
Query 20210728_202457_00005_9rmqb failed: Rule stats system table can return results only on coordinator
java.lang.IllegalStateException: Rule stats system table can return results only on coordinator
	at com.google.common.base.Preconditions.checkState(Preconditions.java:510)
	at io.trino.connector.system.RuleStatsSystemTable.pageSource(RuleStatsSystemTable.java:86)
	at io.trino.connector.system.SystemPageSourceProvider.createPageSource(SystemPageSourceProvider.java:105)
	at io.trino.split.PageSourceManager.createPageSource(PageSourceManager.java:64)
	at io.trino.operator.TableScanOperator.getOutput(TableScanOperator.java:306)
	at io.trino.operator.Driver.processInternal(Driver.java:387)
	at io.trino.operator.Driver.lambda$processFor$9(Driver.java:291)
	at io.trino.operator.Driver.tryWithLock(Driver.java:683)
	at io.trino.operator.Driver.processFor(Driver.java:284)
	at io.trino.execution.SqlTaskExecution$DriverSplitRunner.processFor(SqlTaskExecution.java:1076)
	at io.trino.execution.executor.PrioritizedSplitRunner.process(PrioritizedSplitRunner.java:163)
	at io.trino.execution.executor.TaskExecutor$TaskRunner.run(TaskExecutor.java:484)
	at io.trino.$gen.Trino_359____20210728_202230_2.run(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
	at java.base/java.lang.Thread.run(Thread.java:829)

trino:runtime>

I have tried querying this table in multiple clusters I have access to and tried with node-scheduler.include-coordinator set to both true and false but no luck.

I've tested with 356 and 359 and have hit the same issue on both versions.

@findepi findepi added the bug Something isn't working label Jul 29, 2021
@findepi
Copy link
Member

findepi commented Jul 29, 2021

Caused by 9777b46 (cc @martint), which was fixing f3dda9c (cc @sopel39)

the test should go into io.trino.connector.system.runtime.TestSystemConnector.

@sopel39
Copy link
Member

sopel39 commented Jul 29, 2021

optimizer_rule_stats should now use OptimizerStatsMBeanExporter which should be extended to return ruleStats

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

4 participants