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


##########
modules/platforms/cpp/ignite/protocol/messages.cpp:
##########
@@ -100,4 +100,39 @@ handshake_response parse_handshake_response(bytes_view 
message) {
     return res;
 }
 
+void write_partition_assignment_request(writer &writer, std::int32_t table_id, 
std::int64_t timestamp) {
+    writer.write(table_id);
+    writer.write(timestamp);
+}
+
+std::shared_ptr<partition_assignment> 
read_partition_assignment_response(reader &reader, std::int64_t timestamp) {
+    auto cnt = reader.read_int32();
+    if (cnt <= 0)
+        throw ignite_error("Invalid partition count: " + std::to_string(cnt));

Review Comment:
   I've synchronized with what java client does:
   ```
                           int cnt = r.in().unpackInt();
                           if (cnt <= 0) {
                               throw new IgniteException(INTERNAL_ERR, "Invalid 
partition count returned by the server: " + cnt);
                           }
   ```



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