[pgjdbc/pgjdbc] e2623d: perf: fix 1ms per async CopyAPI (regression since ...
Vladimir Sitnikov <[email protected]>
| Newsgroups | gmane.comp.db.postgresql.jdbc |
|---|---|
| Message-ID | <5bd16ca23a94f_47d62ac01b96e5782083f@hookshot-fe-d252ca1.cp1-iad.github.net.mail> |
Branch: refs/heads/master
Home: https://github.com/pgjdbc/pgjdbc
Commit: e2623d63d4b6fad0b12fb9ace842475e4a9134dc
https://github.com/pgjdbc/pgjdbc/commit/e2623d63d4b6fad0b12fb9ace842475e4a9134dc
Author: Vladimir Sitnikov <[email protected]>
Date: 2018-10-25 (Thu, 25 Oct 2018)
Changed paths:
M CHANGELOG.md
M docs/_posts/2018-08-27-42.2.5-release.md
M pgjdbc/src/main/java/org/postgresql/core/PGStream.java
M pgjdbc/src/main/java/org/postgresql/core/v3/CopyDualImpl.java
M pgjdbc/src/main/java/org/postgresql/core/v3/replication/V3ReplicationProtocol.java
Log Message:
-----------
perf: fix 1ms per async CopyAPI (regression since 42.2.5) (#1314)
The problem is SSL sockets use buffers for input, and `stream#available()` might easily return 0 even though the data is available in the downstream socket. The only viable WA is to perform `read` calls, however it might impact performance (e.g. for async copy operations). The resolution is to throttle read calls for copy api, and keep 1ms reads for replication api.
fixes #1312
**NOTE:** This service has been marked for deprecation: https://developer.github.com/changes/2018-04-25-github-services-deprecation/
Functionality will be removed from GitHub.com on January 31st, 2019.