korlov42 commented on code in PR #5032:
URL: https://github.com/apache/ignite-3/pull/5032#discussion_r1919666317


##########
modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/exec/ddl/DdlCommandHandler.java:
##########
@@ -88,8 +88,15 @@ public DdlCommandHandler(
         this.partitionIdleSafeTimePropagationPeriodMsSupplier = 
partitionIdleSafeTimePropagationPeriodMsSupplier;
     }
 
-    /** Handles ddl commands. */
-    public CompletableFuture<Boolean> handle(CatalogCommand cmd) {
+    /**
+     * Handles ddl commands.
+     *
+     * @param cmd Catalog command.
+     * @return Future representing pending completion of the operation. If the 
command execution resulted in a modification of the catalog,
+     *         the result will be the activation timestamp of the new catalog 
version, if the command did not result in a change of the
+     *         catalog, the result will be {@code null}.
+     */
+    public CompletableFuture<Long> handle(CatalogCommand cmd) {

Review Comment:
   ```suggestion
       public CompletableFuture<@Nullable Long> handle(CatalogCommand cmd) {
   ```
   
   perhaps, it worth to add the annotation to every return type



##########
modules/catalog/src/main/java/org/apache/ignite/internal/catalog/commands/CatalogUtils.java:
##########
@@ -542,11 +542,7 @@ public static HybridTimestamp 
clusterWideEnsuredActivationTsSafeForRoReads(
             LongSupplier partitionIdleSafeTimePropagationPeriodMsSupplier,
             long maxClockSkewMillis
     ) {
-        HybridTimestamp clusterWideEnsuredActivationTs = 
clusterWideEnsuredActivationTimestamp(catalog.time(), maxClockSkewMillis);

Review Comment:
   I think, we can remove `clusterWideEnsuredActivationTsSafeForRoReads`. It 
accepts `partitionIdleSafeTimePropagationPeriodMsSupplier`, but this parameter 
is not used anymore. Also, `partitionIdleSafeTimePropagationPeriodMsSupplier` 
can be removed as well from `CatalogManagerImpl` and `DdlCommandHandler`



##########
modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/framework/ImplicitTxContext.java:
##########
@@ -26,10 +26,12 @@
 
 /** Context that always creates implicit transaction. */
 public class ImplicitTxContext implements QueryTransactionContext {
-    public static final QueryTransactionContext INSTANCE = new 
ImplicitTxContext();
-
     private final HybridTimestampTracker observableTimeTracker = 
HybridTimestampTracker.atomicTracker(null);
 
+    public static ImplicitTxContext instance() {

Review Comment:
   I think, the name `create` will better reflect semantic



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