Fix error handling for exceptions on values parsing.#3574
Fix error handling for exceptions on values parsing.#3574APshenkin wants to merge 1 commit intobrianc:masterfrom
Conversation
- Fix: Avoid connection leaks by ensuring parse closure on error. - Refactor: Move `Writer` instantiation to improve isolation and prevent state reuse issues.
|
I would really appreciate to get a feedback first, that those changes are in right direction. Those two changes are tight together as they both are related to serialization issue. Just because I solved global writer issue first, zombie client appeared next in PgPool, because without fixing writers you just write sync/close in next query I'm not an expert of pg protocol and just investigated this issue few hours. |
|
Yes, these changes make sense. The shared writer was probably an attempt at improving performance. |
If this is something which can be acomplished without reinstantiating the writer I would greatly prefer it. This is extremely hot path code. Is there a way to fix this w/o? Also: needs tests before merging. Thanks for the eyes on this tho! I'll leave it open for a bit as it might be something I can quickly fix (IF there is a repoducable test case on how to trigger the issue) |
Fixes #3573
Writerinstantiation to improve isolation and prevent state reuse issues.