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

Add test case with ORCA query optimizer enabled #800

Merged
merged 1 commit into from
Dec 23, 2024

Conversation

edespino
Copy link
Contributor

Adds test configuration for running regression tests with ORCA enabled:

  • test: ic-good-opt-on
  • make_configs: src/test/regress:installcheck-good
  • pg_settings.optimizer: "on"

The ORCA query optimizer provides cost-based query optimization and offers additional query optimization capabilities. This configuration allows regression testing with ORCA enabled to verify optimizer functionality.

@edespino edespino requested a review from my-ship-it December 19, 2024 08:20
@my-ship-it
Copy link
Contributor

Thanks @edespino for adding the ORCA test back, which provides a guarantee for our subsequent code merging

@edespino
Copy link
Contributor Author

@my-ship-it I am afraid there is some flakiness in these tests. They do not run successfully all the time. Is anyone looking into this? Has the inconsistent orca configuration testing behavior been seen in the past? If I commit these like this, they could cause an issue for developers working on unrelated features yet these orca configured tests fail unexpectedly.

@edespino
Copy link
Contributor Author

Initial test run failed. I am going to attempt to re-run:

Found regression.diffs at: ./src/test/regress/regression.diffs
diff -I HINT: -I CONTEXT: -I GP_IGNORE: -U3 /__w/cloudberry/cloudberry/src/test/regress/expected/bfv_meta_track.out /__w/cloudberry/cloudberry/src/test/regress/results/bfv_meta_track.out
--- /__w/cloudberry/cloudberry/src/test/regress/expected/bfv_meta_track.out	2024-12-19 00:51:37.42999[17](https://github.com/apache/cloudberry/actions/runs/12408761196/job/34641445868#step:18:18)54 -0800
+++ /__w/cloudberry/cloudberry/src/test/regress/results/bfv_meta_track.out	2024-12-19 00:51:37.433991716 -0800
@@ -19,7 +19,7 @@
 select count(*) from pg_stat_last_operation a join pg_policy b on b.oid = a.objid where b.polname = 'p1' and b.polrelid ='t1'::regclass::oid;
  count 
 -------
-     1
+     2
 (1 row)
 
 drop policy p1 on t1;

@edespino
Copy link
Contributor Author

The second attempt to run ic-good-opt-on passed.

@edespino
Copy link
Contributor Author

I am re-running all jobs again. I'm curious how often these tests are failing.

@my-ship-it
Copy link
Contributor

@my-ship-it I am afraid there is some flakiness in these tests. They do not run successfully all the time. Is anyone looking into this? Has the inconsistent orca configuration testing behavior been seen in the past? If I commit these like this, they could cause an issue for developers working on unrelated features yet these orca configured tests fail unexpectedly.

@avamingli Mingli, could you please help continue to investigate on the flaky failure, thanks!

@avamingli
Copy link
Contributor

@my-ship-it I am afraid there is some flakiness in these tests. They do not run successfully all the time. Is anyone looking into this? Has the inconsistent orca configuration testing behavior been seen in the past? If I commit these like this, they could cause an issue for developers working on unrelated features yet these orca configured tests fail unexpectedly.

@avamingli Mingli, could you please help continue to investigate on the flaky failure, thanks!

The problem has been blocking me for a while in another PR, and I currently have no idea how to resolve it. What we can confirm is that the flaky case is unrelated to this or any other PR. It seems quite odd since we only have one table in the schema of the test cases. We haven't encountered this flaky case until about one or two weeks ago.

Initially, I considered the possibility of multiple instances running queries, which might indicate a concurrency issue. However, after syncing with Ed, he confirmed that the test groups run independently.

We could create an issue for this, but I'm unsure how to proceed at the moment.
@weinan003 suggest modifying the test cases to include SELECT xmin to check if the differences are caused by different transactions. I think it's a good idea, and I plan to implement it after my vacation. At the very least, it could represent a small step forward.

Adds test configuration for running regression tests with ORCA enabled:
- test: ic-good-opt-on
- make_configs: src/test/regress:installcheck-good
- pg_settings.optimizer: "on"

The ORCA query optimizer provides cost-based query optimization and offers
additional query optimization capabilities. This configuration allows
regression testing with ORCA enabled to verify optimizer functionality.
@edespino edespino merged commit b54afa4 into apache:main Dec 23, 2024
15 checks passed
@edespino edespino deleted the ic-good-opt-on branch December 24, 2024 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants