You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "xtern (via GitHub)" <gi...@apache.org> on 2025/01/13 08:50:20 UTC
[PR] IGNITE-24055 [ignite-3]
xtern opened a new pull request, #5032:
URL: https://github.com/apache/ignite-3/pull/5032
Thank you for submitting the pull request.
To streamline the review process of the patch and ensure better code quality
we ask both an author and a reviewer to verify the following:
### The Review Checklist
- [ ] **Formal criteria:** TC status, codestyle, mandatory documentation. Also make sure to complete the following:
\- There is a single JIRA ticket related to the pull request.
\- The web-link to the pull request is attached to the JIRA ticket.
\- The JIRA ticket has the Patch Available state.
\- The description of the JIRA ticket explains WHAT was made, WHY and HOW.
\- The pull request title is treated as the final commit message. The following pattern must be used: IGNITE-XXXX Change summary where XXXX - number of JIRA issue.
- [ ] **Design:** new code conforms with the design principles of the components it is added to.
- [ ] **Patch quality:** patch cannot be split into smaller pieces, its size must be reasonable.
- [ ] **Code quality:** code is clean and readable, necessary developer documentation is added if needed.
- [ ] **Tests code quality:** test set covers positive/negative scenarios, happy/edge cases. Tests are effective in terms of execution time and resources.
### Notes
- [Apache Ignite Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Java+Code+Style+Guide)
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24055 Sql. Update the observation timestamp only after processing DDL statements [ignite-3]
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #5032:
URL: https://github.com/apache/ignite-3/pull/5032#discussion_r1919741381
##########
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:
Fixed, thanks
##########
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:
Done.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24055 Sql. Update the observation timestamp only after processing DDL statements [ignite-3]
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern commented on code in PR #5032:
URL: https://github.com/apache/ignite-3/pull/5032#discussion_r1919741163
##########
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:
Thanks, I completely missed that.
Fixed.
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24055 Sql. Update the observation timestamp only after processing DDL statements [ignite-3]
Posted by "korlov42 (via GitHub)" <gi...@apache.org>.
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] IGNITE-24055 Sql. Update the observation timestamp only after processing DDL statements [ignite-3]
Posted by "xtern (via GitHub)" <gi...@apache.org>.
xtern merged PR #5032:
URL: https://github.com/apache/ignite-3/pull/5032
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org