ygerzhedovich commented on code in PR #5121:
URL: https://github.com/apache/ignite-3/pull/5121#discussion_r1935441290
##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogManagerImpl.java:
##########
@@ -395,17 +397,32 @@ private CompletableFuture<Integer>
saveUpdate(UpdateProducer updateProducer, int
Catalog catalog = catalogByVer.lastEntry().getValue();
- List<UpdateEntry> updates;
+ BitSet applyResults = new BitSet(batchUpdateProducers.size());
+ List<UpdateEntry> bulkUpdateEntries = new ArrayList<>();
try {
- updates = updateProducer.get(new UpdateContext(catalog));
+ UpdateContext updateContext = new UpdateContext(catalog);
+ for (int i = 0; i < batchUpdateProducers.size(); i++) {
+ UpdateProducer update = batchUpdateProducers.get(i);
+ List<UpdateEntry> entries = update.get(updateContext);
+
+ for (UpdateEntry entry : entries) {
+ updateContext.updateCatalog(cat ->
entry.applyUpdate(cat, INITIAL_CAUSALITY_TOKEN));
+ }
+
+ if (!entries.isEmpty()) {
+ applyResults.set(i);
+ bulkUpdateEntries.addAll(entries);
+ }
Review Comment:
agree
--
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]