rpuch commented on code in PR #7769:
URL: https://github.com/apache/ignite-3/pull/7769#discussion_r2959537430


##########
modules/placement-driver/src/main/java/org/apache/ignite/internal/placementdriver/leases/LeaseBatchSerializer.java:
##########
@@ -356,7 +356,7 @@ private static int packNodesInfo(int holderNodeIndex, int 
proposedCandidateNameI
     private static boolean 
holderIdAndProposedCandidateFitIn1Byte(NodesDictionary dictionary) {
         // Up to 8 names means that for name index it's enough to have 3 bits, 
same for node index, so, in sum, they
         // require up to 6 bits, and we have 7 bits in a varint byte.
-        return dictionary.nameCount() <= MAX_NODES_FOR_COMPACT_MODE;
+        return dictionary.nameCount() <= MAX_NODES_FOR_COMPACT_MODE && 
dictionary.nodeCount() <= MAX_NODES_FOR_COMPACT_MODE;

Review Comment:
   Doesn't this break compatibility? Could we have a lease batch already 
present in Metastorage that was written having the old logic, but which now 
would be decoded differently with the new logic?



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