sanpwc commented on code in PR #3575:
URL: https://github.com/apache/ignite-3/pull/3575#discussion_r1570538748
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -707,20 +707,37 @@ private CompletableFuture<List<Assignments>>
writeTableAssignmentsToMetastore(
List<Operation> partitionAssignments = new
ArrayList<>(newAssignments.size());
for (int i = 0; i < newAssignments.size(); i++) {
- partitionAssignments.add(put(
- stablePartAssignmentsKey(
- new TablePartitionId(tableId, i)),
- newAssignments.get(i).toBytes()));
+ ByteArray stableAssignmentsKey = stablePartAssignmentsKey(new
TablePartitionId(tableId, i));
+ byte[] anAssignment = newAssignments.get(i).toBytes();
+ Operation op = put(stableAssignmentsKey, anAssignment);
+ partitionAssignments.add(op);
}
Condition condition = notExists(new
ByteArray(partitionAssignments.get(0).key()));
return metaStorageMgr
.invoke(condition, partitionAssignments,
Collections.emptyList())
+ .handle((invokeResult, e) -> {
+ if (e != null) {
+ LOG.error(
+ "Couldn't write assignments {} to
metastore during invoke",
Review Comment:
Should we also wrap assignments with square braces?
--
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]