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

Fixed error: “lost connection to parallel worker” when running parallel query #1883

Merged

Conversation

Deepesh125
Copy link
Contributor

@Deepesh125 Deepesh125 commented Oct 5, 2023

Description

As per coding convention of Postgresql, One should not use elog/ereport with any level of log when error report cycle is in progress. Use of such elog may run into various error particularly when error being processed is reported from parallel worker. This may even run into crashes during cleanup.

In Babelfish, we are using such elog to report log/debug without holding interrupt inside error report cycle which is leading to error like “lost connection to parallel worker”. This commit aim to fix such issue by appropriately holding/resuming interrupts during error report cycle.

Note on test: Given JDBC test cases are sufficient but currently parallel worker is running into other crashes or issues so we can not really show tests here. Have tested this changes locally.

Issues Resolved

Task: BABEL-4393
Signed-off-by: Dipesh Dhameliya [email protected]

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.

contrib/babelfishpg_tsql/src/iterative_exec.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/iterative_exec.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/iterative_exec.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/iterative_exec.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/iterative_exec.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/pl_handler.c Show resolved Hide resolved
contrib/babelfishpg_tsql/src/rolecmds.c Outdated Show resolved Hide resolved
contrib/babelfishpg_tsql/src/rolecmds.c Outdated Show resolved Hide resolved
test/JDBC/parallel_query_jdbc_schedule Show resolved Hide resolved
@Deepesh125 Deepesh125 merged commit 33b8d8f into babelfish-for-postgresql:BABEL_3_X_DEV Oct 25, 2023
Deepesh125 added a commit to amazon-aurora/babelfish_extensions that referenced this pull request Oct 25, 2023
…el query (babelfish-for-postgresql#1883)

As per coding convention of Postgresql, One should not use elog/ereport with any level of log when error report cycle is
in progress. Use of such elog may run into various error particularly when error being processed is reported from
parallel worker. This may even run into crashes during cleanup.

In Babelfish, we are using such elog to report log/debug without holding interrupt inside error report cycle which is
leading to error like “lost connection to parallel worker”. This commit aim to fix such issue by appropriately
holding/resuming interrupts during error report cycle.

Task: BABEL-4393
Signed-off-by: Dipesh Dhameliya <[email protected]>
@Deepesh125 Deepesh125 deleted the jira-babel-4393 branch October 25, 2023 12:25
Deepesh125 added a commit that referenced this pull request Oct 25, 2023
…el query (#1883) (#1953)

As per coding convention of Postgresql, One should not use elog/ereport with any level of log when error report cycle is
in progress. Use of such elog may run into various error particularly when error being processed is reported from
parallel worker. This may even run into crashes during cleanup.

In Babelfish, we are using such elog to report log/debug without holding interrupt inside error report cycle which is
leading to error like “lost connection to parallel worker”. This commit aim to fix such issue by appropriately
holding/resuming interrupts during error report cycle.

Task: BABEL-4393
Signed-off-by: Dipesh Dhameliya <[email protected]>
staticlibs pushed a commit to wiltondb/babelfish_extensions that referenced this pull request Dec 24, 2024
…el query (babelfish-for-postgresql#1883)

As per coding convention of Postgresql, One should not use elog/ereport with any level of log when error report cycle is
in progress. Use of such elog may run into various error particularly when error being processed is reported from
parallel worker. This may even run into crashes during cleanup.

In Babelfish, we are using such elog to report log/debug without holding interrupt inside error report cycle which is
leading to error like “lost connection to parallel worker”. This commit aim to fix such issue by appropriately
holding/resuming interrupts during error report cycle.

Task: BABEL-4393
Signed-off-by: Dipesh Dhameliya <[email protected]>
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.

2 participants