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


##########
modules/platforms/cpp/ignite/client/detail/table/table_impl.cpp:
##########
@@ -472,4 +584,68 @@ std::shared_ptr<table_impl> table_impl::from_facade(table 
&tb) {
     return tb.m_impl;
 }
 
+void table_impl::update_partition_assignment() {
+    ignite_callback<std::shared_ptr<protocol::partition_assignment>> callback 
= [self=shared_from_this()](auto pa) {
+        if (pa.has_error()) {
+            self->m_connection->get_logger()->log_error("Error while updating 
partition assignment for table"
+            + self->get_name() + "error " + pa.error().what_str());
+
+            return;
+        }
+
+        std::lock_guard lock(self->m_partitions_mutex);
+        self->m_partition_assignment = std::move(pa).value();
+    };
+
+    load_partition_assignment_async(std::move(callback));
+}

Review Comment:
   Let's just create a ticket for that and put a TODO here. The solution is 
functional, it's merely an optimization.



-- 
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