Incorrect statement class caused by race condition when closing and opening the connection

Created on 29 January 2017, almost 8 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

In #2664322: key_value table is only used by a core service but it depends on system install β†’ there were test failures with PostgreSQL in ConnectionFailureTest that seemed to be caused by the Connection class having an incorrect statementClass. This was created as a follow-up as it should not block that issue.

Proposed resolution

The issue seems to have come from an inconsistency between the mysql driver and the pgsql driver in the tableExists method. The pg_tables view may be too slow. Find an alternative that is faster. See comment #17 πŸ› Incorrect statement class caused by race condition when closing and opening the connection Needs work . Testing is covered under the ConnectionFailureTest class per @daffie.

A follow-up issue was created to address similar issues with findTables in #2921855: Default Database Schema::findTables() is slow for PostgreSQL β†’ .

Remaining tasks

-

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

9.5

Component
DatabaseΒ  β†’

Last updated 2 days ago

  • Maintained by
  • πŸ‡³πŸ‡±Netherlands @daffie
Created by

πŸ‡ΊπŸ‡ΈUnited States benjifisher Boston area

Live updates comments and jobs are added and updated live.
  • PostgreSQL

    Particularly affects sites running on the PostgreSQL database.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot β†’ tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide β†’ to find step-by-step guides for working with issues.

Production build 0.71.5 2024