ptupitsyn commented on code in PR #7528:
URL: https://github.com/apache/ignite-3/pull/7528#discussion_r2816346533


##########
modules/platforms/python/cpp_module/node_connection.h:
##########
@@ -603,36 +630,48 @@ class node_connection final {
     void on_observable_timestamp(std::int64_t timestamp) {
         auto expected = m_observable_timestamp.load();
         while (expected < timestamp) {
-            auto success = 
m_observable_timestamp.compare_exchange_weak(expected, timestamp);
-            if (success)
+            if (m_observable_timestamp.compare_exchange_weak(expected, 
timestamp))
                 return;
             expected = m_observable_timestamp.load();
         }
     }
 
-    /** Addresses. */
-    const std::vector<ignite::end_point> m_addresses;
+    void send_heartbeat() {
+        auto res = 
sync_request_nothrow(ignite::protocol::client_operation::HEARTBEAT, 
[](auto&){});

Review Comment:
   Would it be better to do an async request, or thread blocking does not 
matter here?



##########
modules/platforms/python/cpp_module/node_connection.h:
##########
@@ -603,36 +630,48 @@ class node_connection final {
     void on_observable_timestamp(std::int64_t timestamp) {
         auto expected = m_observable_timestamp.load();
         while (expected < timestamp) {
-            auto success = 
m_observable_timestamp.compare_exchange_weak(expected, timestamp);
-            if (success)
+            if (m_observable_timestamp.compare_exchange_weak(expected, 
timestamp))
                 return;
             expected = m_observable_timestamp.load();
         }
     }
 
-    /** Addresses. */
-    const std::vector<ignite::end_point> m_addresses;
+    void send_heartbeat() {
+        auto res = 
sync_request_nothrow(ignite::protocol::client_operation::HEARTBEAT, 
[](auto&){});
+        plan_heartbeat(m_heartbeat_interval);

Review Comment:
   If the connection is dead, is it correct to plan the next 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