You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by "kenhuuu (via GitHub)" <gi...@apache.org> on 2026/06/15 21:57:39 UTC

[PR] Share one connection pool across remote transactions in gremlin-driver [tinkerpop]

kenhuuu opened a new pull request, #3461:
URL: https://github.com/apache/tinkerpop/pull/3461

   Each Cluster.transact() previously built its own ClusteredClient, which stood up a full set of per-host connection pools and then tore them down on every commit/rollback. That cost memory and added connection-setup latency (TCP/TLS handshake) to every transaction, even though a transaction only ever talks to one host.
   
   Transactions don't need their own pools or a dedicated connection: the server binds each request to its transaction via the transaction id, and the HTTP model returns a connection to the pool as soon as the response completes. So a transaction only needs to pin to a host, not hold a connection. This lets all transactions share a single, eagerly created ClusteredClient and borrow a connection per request from the pinned host's warm pool, giving transaction requests the same connection occupancy as normal query traffic.
   
   While reworking PinnedClient:
   - Host selection now delegates to the cluster's LoadBalancingStrategy so transactions honor the configured strategy and skip unavailable hosts instead of picking a random (possibly dead) host.
   - closeAsync() no longer tears down pools. The pools belong to the shared client and are closed with the Cluster, after open transactions are rolled back; closing one transaction must not break its siblings.
   
   <!--
   Thanks for contributing! Reminders:
   + TARGET the earliest branch where you want the change
       3.7-dev -> 3.7.7 (non-breaking only)
       3.8-dev -> 3.8.2 (non-breaking only)
       master  -> 4.0.0
   + Committers will MERGE the PR forward to newer versions
   + ADD entry to the CHANGELOG.asciidoc for the targeted version
       Do not reference a JIRA number there
   + ADD JIRA number to title and link in description
   + PRs requires 3 +1s from committers OR
                  1 +1 and 7 day wait to merge.
   + MORE details: https://s.apache.org/rtnal
   -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Share one connection pool across remote transactions in gremlin-driver [tinkerpop]

Posted by "xiazcy (via GitHub)" <gi...@apache.org>.
xiazcy commented on PR #3461:
URL: https://github.com/apache/tinkerpop/pull/3461#issuecomment-4813712085

   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Share one connection pool across remote transactions in gremlin-driver [tinkerpop]

Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu merged PR #3461:
URL: https://github.com/apache/tinkerpop/pull/3461


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Share one connection pool across remote transactions in gremlin-driver [tinkerpop]

Posted by "kenhuuu (via GitHub)" <gi...@apache.org>.
kenhuuu commented on PR #3461:
URL: https://github.com/apache/tinkerpop/pull/3461#issuecomment-4813577725

   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Share one connection pool across remote transactions in gremlin-driver [tinkerpop]

Posted by "Cole-Greer (via GitHub)" <gi...@apache.org>.
Cole-Greer commented on PR #3461:
URL: https://github.com/apache/tinkerpop/pull/3461#issuecomment-4813701057

   VOTE +1


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@tinkerpop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org