isapego commented on code in PR #7966:
URL: https://github.com/apache/ignite-3/pull/7966#discussion_r3080305950


##########
modules/platforms/cpp/ignite/client/detail/cluster_connection.h:
##########
@@ -289,6 +319,22 @@ class cluster_connection : public 
std::enable_shared_from_this<cluster_connectio
      */
     std::shared_ptr<node_connection> get_random_connected_channel();
 
+    /**
+     * Get a preferred node connection if partition mapping is provided
+     * otherwise returns random node connection.
+     * @param preferred_node_name Name of preferred node.
+     * @return Node connection.
+     */
+    std::shared_ptr<node_connection> get_preferred_channel(const std::string& 
preferred_node_name);
+
+    /**
+     * Get connection according to provided partition mapping
+     * otherwise returns random node connection.
+     * @param pm Partition mapping.
+     * @return Node connection.
+     */
+    std::shared_ptr<node_connection> get_connected_channel(const 
std::optional<std::string> &preferred_node_name);

Review Comment:
   I still see both methods, and from the name it's hard to understand which 
does what. We actually only need one.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to