pgnio icon indicating copy to clipboard operation
pgnio copied to clipboard

Reorder reset and add to pool to avoid adding connections with remain…

Open cgenrich opened this issue 5 years ago • 4 comments

…ing work. Utilize atomic operations to avoid set(0) at wrong time concurrently.

cgenrich avatar Mar 15 '20 02:03 cgenrich

In my testing I found that this change had a significant impact on performance when more concurrent operations where being attempted than connections in the pool.

cgenrich avatar Mar 15 '20 02:03 cgenrich

Thanks! I don't use this library as much anymore so I don't know when I'll be able to look real close to check for leaks or concurrency issues (I'm sure there are none). I may request a change or two on formatting/spacing (e.g. around operators, after if keyword, around lambda parameters, but not before closing parens).

cretz avatar Mar 15 '20 11:03 cretz

Thank you for the feedback. Do you have a checkstyle that I can use to ensure I meet your formatting standards? I've eyeballed the change and it appears similar to your style.

I'm curious if you use a different driver for your postgres work or if you've simply moved to another database.

cgenrich avatar Mar 15 '20 17:03 cgenrich

I don't have a checkstyle I'm afraid. I have left the JVM ecosystem entirely for the most part. But I still consider this to be one of the highest quality postgres drivers out there.

cretz avatar Mar 15 '20 21:03 cretz