Skip to content

Remove Inner SQL Connection and Session Pool Caching - #1207

Merged
hnwyllmm merged 11 commits into
masterfrom
issue/2026072200117635959
Jul 31, 2026
Merged

Remove Inner SQL Connection and Session Pool Caching#1207
hnwyllmm merged 11 commits into
masterfrom
issue/2026072200117635959

Conversation

@hnwyllmm

Copy link
Copy Markdown
Member

Task Description

Solution Description

Passed Regressions

Upgrade Compatibility

Other Information

Release Note

@hnwyllmm
hnwyllmm force-pushed the issue/2026072200117635959 branch from 7c66016 to daed74e Compare July 31, 2026 03:56
@hnwyllmm
hnwyllmm merged commit dd9cf34 into oceanbase:master Jul 31, 2026
1 check passed
@hnwyllmm
hnwyllmm deleted the issue/2026072200117635959 branch July 31, 2026 03:56
@hnwyllmm

Copy link
Copy Markdown
Member Author

The mapping Dima issue is about removing ObInnerSQLConnectionPool and using it only as needed.

@footka

footka commented Jul 31, 2026

Copy link
Copy Markdown
Member

src/sql/hybrid_search/ob_hybrid_search_executor.cpp:142

Why is reference counting still needed?

@footka

footka commented Jul 31, 2026

Copy link
Copy Markdown
Member

src/observer/ob_inner_sql_connection.cpp:1704

What's special about this release, and why is it called release_inner_sql_connection_for_proxy? What's its relationship with the proxy?

@hnwyllmm

Copy link
Copy Markdown
Member Author

src/observer/ob_inner_sql_connection.cpp:1704

This provides a Proxy for Oblib to resolve the WEAK_SYMBOL function dependencies from upper layers. There's no special cleanup logic, just an unref, used to isolate the dependencies between oblib and observer.

@hnwyllmm

Copy link
Copy Markdown
Member Author

src/sql/hybrid_search/ob_hybrid_search_executor.cpp:142

Reference counting is unrelated to the connection pool; it ensures that the Conn is not released prematurely while a ReadResult is using the Session inside that Conn. This is the same function originally used for release—only the call location has been moved.

@hnwyllmm

Copy link
Copy Markdown
Member Author

src/observer/ob_inner_sql_connection.cpp:1704

The smart pointer release has been unified, and release_inner_sql_connection_for_proxy is no longer needed and has been removed.

@hnwyllmm

Copy link
Copy Markdown
Member Author

src/sql/hybrid_search/ob_hybrid_search_executor.cpp:142

Changed to use ObSharedGuard smart pointer for allocation and deallocation.

@footka

footka commented Jul 31, 2026

Copy link
Copy Markdown
Member

deps/oblib/src/common/mysqlclient/ob_single_connection_proxy.h:66

Using a guard in a local function scope is relatively safe, but using it as a class member can be dangerous.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants