Skip to content

BUG: Connection leak in db_update_cluster() causes crashes in transaction-based operations #824

Description

@yugalkaushik

Is there an existing issue for this?

  • I have searched the existing issues

What happened?

The db_update_cluster() function in face_clusters.py unconditionally closes database connections in its finally block, even when the connection was passed from external code. This causes crashes in transaction-based operations where the caller manages the connection lifecycle.

Impact:

  • Crashes in transaction-based operations
  • Externally-managed connections are prematurely closed
  • Database integrity issues when operations fail mid-transaction

Record

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions