Skip to content

Remove thread locks from DB connection

Pavel Kisliak requested to merge epam/remove_locks_from_db_conn into main

Type of change

  • Bug Fix
  • Feature

Does this introduce a change in the core logic?

  • [No]

Does this introduce a change in the cloud provider implementation, if so which cloud?

  • AWS
  • Azure
  • GCP
  • IBM

Updates description?

With new concept of using DB connection pool, introduced recently (#48 (closed)), it's became redundant usages of thread locks in the PostgreSql connection (#41 (closed)).
They were definitely helpful, but currently one DB connection used only per one request (previously was one connection per user session).

In this MR, thread locks were replaced to a guard which will help to prevent usages DB connection from multiple threads.
Concurrent commands does not supported by PqLib by default, parallel running can raise different type of exceptions (which don't say anything about concurrency).

Merge request reports