[pgjdbc/pgjdbc] 4673fd: feat: synchronize statement executions (e.g. avoid...

Поиск
Список
Период
Сортировка
Искать

[pgjdbc/pgjdbc] 4673fd: feat: synchronize statement executions (e.g. avoid...

От:
Vladimir Sitnikov <noreply@github.com>
Дата:
  Branch: refs/heads/master
  Home:   https://github.com/pgjdbc/pgjdbc
  Commit: 4673fd271c63a24b2a363149945187bad911888a
      https://github.com/pgjdbc/pgjdbc/commit/4673fd271c63a24b2a363149945187bad911888a
  Author: Vladimir Sitnikov 
  Date:   2022-07-27 (Wed, 27 Jul 2022)

  Changed paths:
    M CHANGELOG.md
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgCallableStatement.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgConnection.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgPreparedStatement.java
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgStatement.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc2/StatementTest.java

  Log Message:
  -----------
  feat: synchronize statement executions (e.g. avoid deadlock when Connection.isValid is executed from concurrent threads)

This does not bring full thread safety to the driver, however,
it should reduce the number of issues when connections and statements
are accidentally executed concurrently in several threads.

fixes #1768


  Commit: 736f9598c5b32a19c645ad33f118d2c9c266e90e
      https://github.com/pgjdbc/pgjdbc/commit/736f9598c5b32a19c645ad33f118d2c9c266e90e
  Author: Vladimir Sitnikov 
  Date:   2022-07-27 (Wed, 27 Jul 2022)

  Changed paths:
    M pgjdbc/src/main/java/org/postgresql/jdbc/PgStatement.java
    M pgjdbc/src/test/java/org/postgresql/test/jdbc2/StatementTest.java

  Log Message:
  -----------
  fix: replace syncronization in Connection.close with compareAndSet

Statement can be synchronized during query execution, and we don't want
.close() to wait for the statement completion.


Compare: https://github.com/pgjdbc/pgjdbc/compare/fd31a06f9c64...736f9598c5b3


FAQ