brianfrankcooper / YCSB

Yahoo! Cloud Serving Benchmark
Apache License 2.0
4.93k stars 2.23k forks source link

[postgrenosql] Each thread gets its own connection to the database. #1691

Open xwkuang5 opened 10 months ago

xwkuang5 commented 10 months ago

While the PostgreSQL JDBC driver is thread-safe (ref), multiple threads using the same connection returned from the driver will still block each other.

This change updates the DB client implementation to have each thread maintain their own driver and connection. This is useful in the transaction phase to improve the throughput performance of a single load driver process without having to resort to using multiple processes.