xtern commented on code in PR #4240:
URL: https://github.com/apache/ignite-3/pull/4240#discussion_r1726348084
##########
modules/catalog-compaction/src/main/java/org/apache/ignite/internal/catalog/compaction/CatalogCompactionRunner.java:
##########
@@ -194,6 +200,31 @@ public CompletableFuture<Void> startAsync(ComponentContext
componentContext) {
return;
}
+ if (message.messageType() ==
CatalogCompactionMessageGroup.PREPARE_TO_UPDATE_TIME_ON_REPLICAS_REQUEST) {
+ assert correlationId != null;
+
+ long txBeginTime =
((CatalogCompactionPrepareUpdateTxBeginTimeRequest) message).timestamp();
+
+ propagateTimeToReplicasLocal(txBeginTime)
+ .whenComplete((result, ex) -> {
+
CatalogCompactionPrepareUpdateTxBeginTimeResponseBuilder responseBuilder =
Review Comment:
This code simplified.
##########
modules/catalog-compaction/src/main/java/org/apache/ignite/internal/catalog/compaction/CatalogCompactionRunner.java:
##########
@@ -273,28 +304,36 @@ private CompletableFuture<Void>
startCompaction(LogicalTopologySnapshot topology
CompletableFuture<Boolean> catalogCompactionFut;
if (catalog == null) {
- LOG.info("Catalog compaction skipped, nothing to
compact (ts={})", minRequiredTime);
+ LOG.info("Catalog compaction skipped, nothing to
compact [timestamp={}].", minRequiredTime);
catalogCompactionFut =
CompletableFutures.falseCompletedFuture();
} else {
catalogCompactionFut = tryCompactCatalog(catalog,
topologySnapshot).whenComplete((res, ex) -> {
if (ex != null) {
- LOG.warn("Catalog compaction has failed
(timestamp={})", ex, minRequiredTime);
+ LOG.warn("Catalog compaction has failed
[timestamp={}].", ex, minRequiredTime);
} else {
if (res) {
- LOG.info("Catalog compaction completed
successfully (timestamp={})", minRequiredTime);
+ LOG.info("Catalog compaction completed
successfully [timestamp={}].", minRequiredTime);
} else {
- LOG.info("Catalog compaction skipped
(timestamp={})", minRequiredTime);
+ LOG.info("Catalog compaction skipped
[timestamp={}].", minRequiredTime);
}
}
});
}
- CompletableFuture<Void> propagateToReplicasFut =
+ CompletableFuture<Boolean> propagateToReplicasFut =
propagateTimeToReplicas(minActiveTxBeginTime,
topologySnapshot.nodes())
- .whenComplete((res, ex) -> {
+ .whenComplete((success, ex) -> {
if (ex != null) {
- LOG.warn("Failed to propagate
minimum active tx begin time to replicas", ex);
+ LOG.warn("Failed to propagate
minimum required time to replicas.", ex);
+ }
+
+ if (!success) {
+ LOG.info("Propagation of minimum
required time to replicas "
Review Comment:
this code was removed
--
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]