sergey-chugunov-1985 commented on code in PR #1235:
URL: https://github.com/apache/ignite-3/pull/1235#discussion_r1012665401


##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/raft/PartitionListener.java:
##########
@@ -158,11 +167,12 @@ public void 
onWrite(Iterator<CommandClosure<WriteCommand>> iterator) {
      */
     private void handleUpdateCommand(UpdateCommand cmd, long commandIndex) {
         storage.runConsistently(() -> {
-            BinaryRow row = cmd.getRow();
-            RowId rowId = cmd.getRowId();
+            BinaryRow row = cmd.rowBuffer() != null ? new 
ByteBufferRow(cmd.rowBuffer().toByteArray()) : null;
+            UUID rowUuid = cmd.rowUuid();
+            RowId rowId = new RowId(partitionId, 
rowUuid.getMostSignificantBits(), rowUuid.getLeastSignificantBits());
             UUID txId = cmd.txId();
-            UUID commitTblId = cmd.getCommitReplicationGroupId().getTableId();
-            int commitPartId = cmd.getCommitReplicationGroupId().getPartId();
+            UUID commitTblId = cmd.tablePartitionId().tableId();

Review Comment:
   The main reason was to unify name of the field: it was named 
replicationGroupId in FinishTxCommand and commitReplicationGroupId in Update 
and UpdateAll commands. So they weren't uniform.
   And return type wasn't uniform too: TablePartitionId in Update/UpdateAll and 
ReplicationGroupId in FinishTxCommand.
   
   I decided to unify these names and chose name ```tablePartitionId``` to 
better reflect type of actual object that is transferred by commands.



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