-
Notifications
You must be signed in to change notification settings - Fork 45
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
RONDB-822 pushdown-aggregation bugfix #613
RONDB-822 pushdown-aggregation bugfix #613
Conversation
Description: it's not a bug and works fine in the release binary. The assertion was added to ensure everything behaves as I expected. Specifically, I wanted to verify that when LQH sends scanfragconf to TC, no aggregation results remain cached unless: We are scanning and aggregating an empty table. No rows meet the filter condition. It's the end of the scan. Under these conditions, the scanPtr->scanState should change to ScanRecord::WAIT_CLOSE_SCAN. However, this case help us catch an new exception: When performing an index scan on an empty table, dbtux directly returns ZEMPTY_FRAGMENT, skipping the state transition from ScanRecord::WAIT_ACC_SCAN to ScanRecord::WAIT_CLOSE_SCAN. This behavior causes the assertion to trigger. The root cause lies in the different ways dbtux and dbtup handle empty tables during execACC_SCANREQ. Solution: Add ScanRecord::WAIT_ACC_SCAN to the assertion to account for this scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The result file has diffs indicating a bug in null handling. I'm not sure whether this bug is in RonSQL or PDAgg. If you don't want to fix the bug, at least remove the diff lines, causing the test case to fail, open a ticket and edit mysql-test/suite/ronsql/disabled.def
by updating the ticket number. If you do fix it, the diff lines should be removed when running the case with --record
, and you can remove the case from disabled.def
.
+++ ronsql.out | ||
@@ -1,2 +1,2 @@ | ||
count(*) | ||
-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This diff indicates another bug in how null values are handled.
+++ ronsql.out | ||
@@ -1,2 +1,2 @@ | ||
count(*) | ||
-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
+++ ronsql.out | ||
@@ -1,2 +1,2 @@ | ||
count(*) | ||
-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
+++ ronsql.out | ||
@@ -1,2 +1,2 @@ | ||
count(*) | ||
-0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same.
Thank you for the review! @svenssonaxel |
.result updated |
@KernelMaker Sounds great! Kindly create a ticket and update |
@svenssonaxel Done. |
I believe you meant |
e057933
to
f1b99c9
Compare
Description:
it's not a bug and works fine in the release binary.
The assertion was added to ensure everything behaves as I expected.
Specifically, I wanted to verify that when LQH sends scanfragconf to TC,
no aggregation results remain cached unless:
Under these conditions, the scanPtr->scanState should change to
ScanRecord::WAIT_CLOSE_SCAN.
However, this case help us catch an new exception:
When performing an index scan on an empty table, dbtux directly
returns ZEMPTY_FRAGMENT, skipping the state transition from
ScanRecord::WAIT_ACC_SCAN to ScanRecord::WAIT_CLOSE_SCAN. This
behavior causes the assertion to trigger. The root cause lies in the
different ways dbtux and dbtup handle empty tables during
execACC_SCANREQ.
Solution:
Add ScanRecord::WAIT_ACC_SCAN to the assertion to account for this
scenario.