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

fix crash in fixeddecimalaggstateserialize and fixeddecimalaggstatedeserialize for parallel queries #1999

Conversation

rohit01010
Copy link
Contributor

@rohit01010 rohit01010 commented Nov 9, 2023

Description

In parallel query context, variables state and sstate can be NULL in functions fixeddecimalaggstateserialize and fixeddecimalaggstatedeserialize respectively. This scenario was not handled properly in functions fixeddecimalaggstateserialize and fixeddecimalaggstatedeserialize. This PR adds a check in these functions which will handle this NULL value scenario.

Also removed babel_money test from parallel_query_jdbc_schedule file, as the crash will be resolved by this PR.

Signed-off-by: Rohit Bhagat [email protected]

Issues Resolved

BABEL-4261

Test Scenarios Covered

  • Use case based - YES

  • Boundary conditions - NA

  • Arbitrary inputs - NA

  • Negative test cases - NA

  • Minor version upgrade tests - NA

  • Major version upgrade tests - NA

  • Performance tests - NA

  • Tooling impact - NA

  • Client tests - NA

Check List

  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is under the terms of the Apache 2.0 and PostgreSQL licenses, and grant any person obtaining a copy of the contribution permission to relicense all or a portion of my contribution to the PostgreSQL License solely to contribute all or a portion of my contribution to the PostgreSQL open source project.

For more information on following Developer Certificate of Origin and signing off your commits, please check here.

…serialize for parallel queries

In parallel query context, variables state and sstate can be NULL in functions fixeddecimalaggstateserialize and fixeddecimalaggstatedeserialize respectively. This scenario was not handled properly in functions fixeddecimalaggstateserialize and fixeddecimalaggstatedeserialize. This PR adds a check in these functions which will handle this NULL value scenario.

Task: BABEL-4261
Signed-off-by: Rohit Bhagat <[email protected]>
@rohit01010 rohit01010 requested a review from Deepesh125 November 9, 2023 08:15
Deepesh125
Deepesh125 previously approved these changes Nov 9, 2023
…#1604)

* Fix backward scan flag for parallel queries

Currently there is a bug in Babelfish that allows the backward scan flag
to be set for parallel queries. However, backward scans cannot be
parallelized. This bug results in assertion failures in the Postgres engine and
leads Babelfish queries to crash. In this commit, we fix the issue by
disallowing backward scan flag to be set when a query is in parallel
mode. This issue occurs during the implementation of full text search in
Babelfish. Fixing the issue unblocks full text search implementation.

Task: BABEL-4261, BABEL-4281
Signed-off-by: Robin Li <[email protected]>
@Deepesh125 Deepesh125 merged commit 8be0ec9 into babelfish-for-postgresql:BABEL_2_X_DEV Nov 10, 2023
23 checks passed
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.

3 participants