tkalkirill commented on code in PR #763:
URL: https://github.com/apache/ignite-3/pull/763#discussion_r846012548
##########
modules/table/src/main/java/org/apache/ignite/internal/table/distributed/TableManager.java:
##########
@@ -738,23 +738,27 @@ public Table createTable(String name,
Consumer<TableChange> tableInitChange) {
if (tbl != null) {
tblFut.completeExceptionally(new
TableAlreadyExistsException(name));
} else {
- tablesCfg.tables().change(change -> {
- if (change.get(name) != null) {
+ tablesCfg.change(tablesChange ->
tablesChange.changeTables(tablesListChange -> {
+ if (tablesListChange.get(name) != null) {
throw new TableAlreadyExistsException(name);
}
- change.create(name, (ch) -> {
- tableInitChange.accept(ch);
+ tablesListChange.create(name, (tableChange) -> {
+ tableChange.changeDataStorage(
+
dataStorageMgr.defaultTableDataStorageConsumer(tablesChange.defaultDataStorage())
+ );
- var extConfCh = ((ExtendedTableChange) ch);
+ tableInitChange.accept(tableChange);
+
+ var extConfCh = ((ExtendedTableChange) tableChange);
tableCreateFuts.put(extConfCh.id(), tblFut);
// Affinity assignments calculation.
extConfCh.changeAssignments(ByteUtils.toBytes(AffinityUtils.calculateAssignments(
baselineMgr.nodes(),
- ch.partitions(),
- ch.replicas())))
+ tableChange.partitions(),
Review Comment:
It was difficult for me to read what was happening, it became more clear.
Should I return?
--
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]