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

Close physical connection receiving on "Database might have been dropped by another user" error from server in ysql conn mgr #23218

Closed
yugabyte-ci opened this issue Jul 16, 2024 · 0 comments
Labels
jira-originated kind/new-feature This is a request for a completely new feature priority/high High Priority

Comments

@yugabyte-ci
Copy link
Contributor

yugabyte-ci commented Jul 16, 2024

Jira Link: DB-12160

@yugabyte-ci yugabyte-ci added jira-originated kind/new-feature This is a request for a completely new feature priority/high High Priority labels Jul 16, 2024
manav-yb pushed a commit that referenced this issue Jul 23, 2024
…"Database might have been dropped by another user"

Summary:
This diff fixes one of the test `org.yb.pgsql.TestPgDropDatabase#testRecreateDatabase` failing with ysql connection manager.

**Reason for the test failure**

For errors like "Database might have been dropped by another user", ysql connection manager throws the FATAL packet without detaching or closing the backend process before closing the client connection. Due to which an assert failure happened while removing the client connection from the pool which leads to crash and restart of ysql connection manager process. Therefore all the pre existed logical connection present crash also starts failing.

**Fix**
After connection manager receives an error message "Database might have been dropped by another user" from postgres, a ERROR packet is sent to client instead of FATAL (in order to mimic same behaviour as without connection manager) and corresponding logical and physical connections are closed.

Test Plan:
Jenkins: all tests, enable connection manager

Ensure below test runs successfully with ysql connection manager:

`./yb_build.sh --enable-ysql-conn-mgr-test --java-test org.yb.pgsql.TestPgDropDatabase#testRecreateDatabase`

Reviewers: asrinivasan, nkumar, skumar

Reviewed By: asrinivasan

Subscribers: yql

Differential Revision: https://phorge.dev.yugabyte.com/D36461
jasonyb pushed a commit that referenced this issue Jul 24, 2024
Summary:
 Excluded: 7414711 [#20972] YSQL: Fix new local variable names in PG code
 3484013 [#20766] YSQL: Remove time stuff from the GetTableKeyRanges functions.
 8b23629 [#18360] YSQL: fix yb_hash_code compared to an out of range constant
 4ee3511 [PLAT-13438]: Add support for preview gflags
 fe5e675 [#23218] YSQL: Closing the backend connection on receiving the error "Database might have been dropped by another user"
 0901f6c [doc] Default databases (#23261)
 afaf353 [PLAT-14722]Upgrade YBC client and server versio to 2.2.0.0-b3
 fdffc33 [#13358] YSQL: DDL Atomicity Stress Test
 f0b3c46 [ #21499] YSQL: Skipping the test with connection manager as they are unsuitable
 5ed864d [#23260] CDCSDK: Propagate stream expiry & GC error to walsender
 e37d791 [PLAT-14627][PLAT-14729][PLAT-14726]Process group-based specific gflags comprehensively across multiple callsites in YBA
 0e17c97 [PLAT-14737]Missing/incorrect universe status loader positions on dashboard page
 6477bad [PLAT-12434] YNP fix XDG_RUNTIME_DIR to be set in .bashrc for non login shells
 f3ffb18 [docs] Tablet metadata and ASH updates (#23221)

Test Plan: Jenkins: rebase: pg15-cherrypicks

Reviewers: jason, tfoucher

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D36814
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
jira-originated kind/new-feature This is a request for a completely new feature priority/high High Priority
Projects
None yet
Development

No branches or pull requests

1 participant