You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The index backfill libpq connection created in tablet.cc uses the raw C funcs, so it is easy to miss some spots where objects should be freed, and ASAN failures abound. Create and link a library containing the pgwrapper C++ functions with destructors so that these issues can be more easily avoided.
The text was updated successfully, but these errors were encountered:
Summary:
We have `libpq_utils` that use the PQ library to create connections and
manage them using C++ objects. They are handy for making sure we clear
results and connections after use. There are some issues around this
area:
- YSQL index backfill doesn't use them and just uses the raw PQ
library. There have been some mistakes causing ASAN issues
- User name is hard-coded to `postgres` for `PGConn::Connect`
- Database name and user name aren't properly escaped, so weird names
may cause issues
Fix all of them. Notably, split off part of the `pg_wrapper_test_base`
library to a new library `pq_utils` so that `tablet` can use `pq_utils`
as a dependency without getting a dependency cycle. Then, YSQL index
backfill uses the C++ wrapped PQ objects.
Original Commit: 5243a4a
Original Differential Revision: https://phabricator.dev.yugabyte.com/D9916
Test Plan:
Jenkins: rebase: 2.4
`./yb_build.sh --cxx-test pgwrapper_lib_pq-test --gtest_filter
'PgLibPqTest.*Names'`
Reviewers: mbautin
Reviewed By: mbautin
Subscribers: yql
Differential Revision: https://phabricator.dev.yugabyte.com/D10041
The index backfill libpq connection created in
tablet.cc
uses the raw C funcs, so it is easy to miss some spots where objects should be freed, and ASAN failures abound. Create and link a library containing the pgwrapper C++ functions with destructors so that these issues can be more easily avoided.The text was updated successfully, but these errors were encountered: