Re: [PR] IGNITE-18372 CDC metrics documentation update [ignite]
alex-plekhanov merged PR #11420: URL: https://github.com/apache/ignite/pull/11420 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-18372 metrics for k2i consumer [ignite-extensions]
asfgit closed pull request #277: IGNITE-18372 metrics for k2i consumer URL: https://github.com/apache/ignite-extensions/pull/277 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22662 : Snapshot check as distributed process [ignite]
timoninmaxim commented on code in PR #11391: URL: https://github.com/apache/ignite/pull/11391#discussion_r1678752158 ## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotCheckProcess.java: ## @@ -0,0 +1,549 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.io.Serializable; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Function; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.events.DiscoveryEvent; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.management.cache.IdleVerifyResultV2; +import org.apache.ignite.internal.management.cache.PartitionKeyV2; +import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2; +import org.apache.ignite.internal.util.distributed.DistributedProcess; +import org.apache.ignite.internal.util.future.GridFinishedFuture; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; +import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_CHECK_METAS; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_VALIDATE_PARTS; + +/** Distributed process of snapshot checking (with the partition hashes). */ +public class SnapshotCheckProcess { +/** */ +private final IgniteLogger log; + +/** */ +private final GridKernalContext kctx; + +/** Snapshot check requests per snapshot on every node. */ +private final Map requests = new ConcurrentHashMap<>(); + +/** Cluster-wide operation futures per snapshot called from current node. */ +private final Map> clusterOpFuts = new ConcurrentHashMap<>(); + +/** Check metas first phase subprocess. */ +private final DistributedProcess phase1CheckMetas; + +/** Partition hashes second phase subprocess. */ +private final DistributedProcess phase2PartsHashes; + +/** */ +public SnapshotCheckProcess(GridKernalContext kctx) { +this.kctx = kctx; + +log = kctx.log(getClass()); + +phase1CheckMetas = new DistributedProcess<>(kctx, SNAPSHOT_CHECK_METAS, this::prepareAndCheckMetas, +this::reducePreparationAndMetasCheck); + +phase2PartsHashes = new DistributedProcess<>(kctx, SNAPSHOT_VALIDATE_PARTS, this::validateParts, +this::reduceValidatePartsAndFinish); + +kctx.event().addLocalEventListener((evt) -> nodeLeft(((DiscoveryEvent)evt).eventNode()), EVT_NODE_FAILED, EVT_NODE_LEFT); +} + +/** */ +Map requests() { +return Collections.unmodifiableMap(requests); +} + +/** + * Stops the process with the passed exception. + * + * @param th The interrupt reason. + * @param rqFilter If not {@code null}, used to filter which requests/process to stop. If {@code null}, stops all the validations. + */ +void interrupt(Throwable th, @Nullable Function rqFilter) { +requests.values().forEach(rq -> { +if (rqFilter == null || rqFilter.apply(rq)) { +rq.error(th); + +clean(rq.requestId(), th, null, null); +} +}); +} + +/** Stops the related validation if the node is a mandatory one. */ +
Re: [PR] IGNITE-22619 Add `InternalTable#estimatedSize` method [ignite-3]
sanpwc commented on code in PR #4065: URL: https://github.com/apache/ignite-3/pull/4065#discussion_r1678271523 ## modules/table/build.gradle: ## @@ -64,6 +64,7 @@ dependencies { testImplementation project(':ignite-page-memory') testImplementation project(':ignite-storage-rocksdb') testImplementation project(':ignite-placement-driver-api') +testImplementation project(':ignite-placement-driver') Review Comment: Curious why placement-driver-api is not enough? ## modules/table/src/test/java/org/apache/ignite/internal/table/distributed/storage/InternalTableEstimatedSizeTest.java: ## @@ -0,0 +1,471 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.table.distributed.storage; + +import static java.util.concurrent.CompletableFuture.completedFuture; +import static java.util.concurrent.CompletableFuture.failedFuture; +import static java.util.stream.Collectors.toList; +import static org.apache.ignite.internal.network.utils.ClusterServiceTestUtils.clusterService; +import static org.apache.ignite.internal.testframework.IgniteTestUtils.testNodeName; +import static org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willBe; +import static org.apache.ignite.internal.testframework.matchers.CompletableFutureMatcher.willCompleteSuccessfully; +import static org.apache.ignite.internal.util.CompletableFutures.nullCompletedFuture; +import static org.apache.ignite.internal.util.IgniteUtils.startAsync; +import static org.apache.ignite.internal.util.IgniteUtils.stopAsync; +import static org.hamcrest.MatcherAssert.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyLong; +import static org.mockito.ArgumentMatchers.anyString; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.lenient; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.spy; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ForkJoinPool; +import java.util.concurrent.ThreadLocalRandom; +import java.util.concurrent.TimeoutException; +import java.util.stream.IntStream; +import org.apache.ignite.internal.catalog.CatalogService; +import org.apache.ignite.internal.configuration.testframework.ConfigurationExtension; +import org.apache.ignite.internal.configuration.testframework.InjectConfiguration; +import org.apache.ignite.internal.hlc.ClockService; +import org.apache.ignite.internal.hlc.ClockServiceImpl; +import org.apache.ignite.internal.hlc.ClockWaiter; +import org.apache.ignite.internal.hlc.HybridClockImpl; +import org.apache.ignite.internal.hlc.HybridTimestamp; +import org.apache.ignite.internal.manager.ComponentContext; +import org.apache.ignite.internal.manager.IgniteComponent; +import org.apache.ignite.internal.metastorage.MetaStorageManager; +import org.apache.ignite.internal.metastorage.impl.StandaloneMetaStorageManager; +import org.apache.ignite.internal.metastorage.server.SimpleInMemoryKeyValueStorage; +import org.apache.ignite.internal.network.ClusterNodeResolver; +import org.apache.ignite.internal.network.ClusterService; +import org.apache.ignite.internal.network.MessagingService; +import org.apache.ignite.internal.network.StaticNodeFinder; +import org.apache.ignite.internal.placementdriver.PlacementDriver; +import org.apache.ignite.internal.placementdriver.leases.Lease; +import org.apache.ignite.internal.raft.Command; +import org.apache.ignite.internal.raft.service.RaftCommandRunner; +import org.apache.ignite.internal.replicator.ReplicaService; +import org.apache.ignite.internal.replicator.TablePartitionId; +import org.apache.ignite.internal.replicator.configuration.ReplicationConfiguration; +import org.apache.ignite.internal.replicator.message.ReplicaMessagesFactory; +import org.apache.ignite.internal.replicator.message.ReplicaRequest; +import
Re: [PR] IGNITE-22661 Add catalog version into Assignments [ignite-3]
sanpwc commented on code in PR #4056: URL: https://github.com/apache/ignite-3/pull/4056#discussion_r1678235374 ## modules/affinity/src/main/java/org/apache/ignite/internal/affinity/Assignments.java: ## @@ -53,32 +53,38 @@ public class Assignments implements Serializable { */ private final boolean force; +/** + * Version of Catalog that matches current assignments. + */ +private final int catalogVersion; Review Comment: I don't like how it looks. Formally Assignments is a part of affinity module that should not depend on catalog. Let's revise an idea of using a timestamp here. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22661 Add catalog version into Assignments [ignite-3]
sanpwc commented on code in PR #4056: URL: https://github.com/apache/ignite-3/pull/4056#discussion_r1678058683 ## modules/affinity/src/main/java/org/apache/ignite/internal/affinity/Assignments.java: ## @@ -40,7 +40,7 @@ public class Assignments implements Serializable { private static final long serialVersionUID = -59553172012153869L; /** Empty assignments. */ -public static final Assignments EMPTY = new Assignments(Collections.emptySet(), false); +public static final Assignments EMPTY = new Assignments(Collections.emptySet(), false, 0); Review Comment: Is 0 a valid catalog version? I mean that it shouldn't be valid if we wan't to use it as a default value. ## modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/RebalanceRaftGroupEventsListener.java: ## @@ -271,7 +282,13 @@ private void countDownPartitionsFromZone(Set stable) { Condition condition = value(tablesCounterKey(zoneId, partId)).eq(counterEntry.value()); -byte[] stableArray = Assignments.toBytes(stable); +Entry catalogVersionEntry = metaStorageMgr.get(catalogVersionKey(zoneId, partId)).get(); + +assert catalogVersionEntry.value() != null; + +int catalogVersion = bytesToInt(catalogVersionEntry.value()); + +byte[] stableArray = Assignments.toBytes(catalogVersion, stable); Review Comment: I agree with Misha, catalogVersion as an initial parameter is confusing. ## modules/affinity/src/main/java/org/apache/ignite/internal/affinity/Assignments.java: ## @@ -53,32 +53,38 @@ public class Assignments implements Serializable { */ private final boolean force; +/** + * Version of Catalog that matches current assignments. Review Comment: Such definition is rather ambiguous. Could you please expand it a bit explaining that it's a catalog version at the time of assignments calculation? ## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java: ## @@ -828,7 +831,8 @@ private CompletableFuture handleChangePendingAssignmentEvent( return handleChangePendingAssignmentEvent( zonePartitionId, stableAssignments, -pendingAssignments +pendingAssignments, +catalogVersion Review Comment: Why should we pass catalogVersion explicitly if we already have one in pendingAssignments parameter? ## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java: ## @@ -663,7 +663,8 @@ public CompletableFuture onUpdate(WatchEvent evt) { dataNodes, zoneDescriptor.replicas(), replicaGrpId, -evt +evt, +catalogVersion Review Comment: It's errorprone to pass catalogVersion like that, first of all because neither naming nor semantics enforces its boundaries. As mentioned above I'd consider adding catalog version to zoneDescriptor and pass it as is. ## modules/distribution-zones/src/main/java/org/apache/ignite/internal/distributionzones/rebalance/RebalanceRaftGroupEventsListener.java: ## @@ -429,14 +439,22 @@ static void doStableKeySwitch( Set retrievedStable = readAssignments(stableEntry).nodes(); Set retrievedSwitchReduce = readAssignments(switchReduceEntry).nodes(); Set retrievedSwitchAppend = readAssignments(switchAppendEntry).nodes(); -Set retrievedPending = readAssignments(pendingEntry).nodes(); + +Assignments pendingAssignments = readAssignments(pendingEntry); + +Set retrievedPending = pendingAssignments.nodes(); long stableChangeTriggerValue = stableChangeTriggerEntry.value() == null ? 0L : bytesToLongKeepingOrder(stableChangeTriggerEntry.value()); if (!retrievedPending.equals(stableFromRaft)) { return; } +int catalogVersion = pendingAssignments.catalogVersion(); Review Comment: Could you please add a comment explaining why it's safe to use catalog version from pending assignments? I mean that we obviously have a case when the node is stale and thus it will read new pending and not the one that it's currently processing within onChangePeersConfiguartionApplied. ## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/PartitionReplicaLifecycleManager.java: ## @@ -565,7 +565,7 @@ private CompletableFuture> getOrCreateAssignments( dataNodes,
[PR] IGNITE-22691 Delete startReplica(ReplicationGroupId, PendingComparableValuesTracker, CompletableFuture) [ignite-3]
JAkutenshi opened a new pull request, #4090: URL: https://github.com/apache/ignite-3/pull/4090 JIRA Ticket: [IGNITE-22691 | ](https://issues.apache.org/jira/browse/IGNITE-22691) ## The goal ## The reason ## The solution --- 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Bump dev.welbyseely.gradle-cmake-plugin from 0.0.5 to 0.1.0 [ignite-3]
dependabot[bot] opened a new pull request, #4088: URL: https://github.com/apache/ignite-3/pull/4088 Bumps dev.welbyseely.gradle-cmake-plugin from 0.0.5 to 0.1.0. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dev.welbyseely.gradle-cmake-plugin=gradle=0.0.5=0.1.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Bump org.rocksdb:rocksdbjni from 9.3.1 to 9.4.0 [ignite-3]
dependabot[bot] opened a new pull request, #4089: URL: https://github.com/apache/ignite-3/pull/4089 Bumps [org.rocksdb:rocksdbjni](https://github.com/facebook/rocksdb) from 9.3.1 to 9.4.0. Release notes Sourced from https://github.com/facebook/rocksdb/releases;>org.rocksdb:rocksdbjni's releases. RocksDB 9.4.0 9.4.0 (2024-06-23) New Features Added a CompactForTieringCollectorFactory to auto trigger compaction for tiering use case. Optimistic transactions and pessimistic transactions with the WriteCommitted policy now support the GetEntityForUpdate API. Added a new count command to the ldb repl shell. By default, it prints a count of keys in the database from start to end. The options --from= and/or --to= can be specified to limit the range. Add rocksdb_writebatch_update_timestamps, rocksdb_writebatch_wi_update_timestamps in C API. Add rocksdb_iter_refresh in C API. Add rocksdb_writebatch_create_with_params, rocksdb_writebatch_wi_create_with_params to create WB and WBWI with all options in C API Public API Changes Deprecated names LogFile and VectorLogPtr in favor of new names WalFile and VectorWalPtr. Introduce a new universal compaction option CompactionOptionsUniversal::max_read_amp which allows user to define the limit on the number of sorted runs separately from the trigger for compaction (level0_file_num_compaction_trigger) https://redirect.github.com/facebook/rocksdb/issues/12477;>#12477. Behavior Changes Inactive WALs are immediately closed upon being fully sync-ed rather than in a background thread. This is to ensure LinkFile() is not called on files still open for write, which might not be supported by some FileSystem implementations. This should not be a performance issue, but an opt-out is available with with new DB option background_close_inactive_wals. Bug Fixes Fix a rare case in which a hard-linked WAL in a Checkpoint is not fully synced (so might lose data on power loss). Fixed the output of the ldb dump_wal command for PutEntity records so it prints the key and correctly resets the hexadecimal formatting flag after printing the wide-column entity. Fixed an issue where PutEntity records were handled incorrectly while rebuilding transactions during recovery. Various read operations could ignore various ReadOptions that might be relevant. Fixed many such cases, which can result in behavior change but a better reflection of specified options. Performance Improvements Improved write throughput to memtable when there's a large number of concurrent writers and allow_concurrent_memtable_write=true(https://redirect.github.com/facebook/rocksdb/issues/12545;>#12545) Changelog Sourced from https://github.com/facebook/rocksdb/blob/main/HISTORY.md;>org.rocksdb:rocksdbjni's changelog. 9.4.0 (06/23/2024) New Features Added a CompactForTieringCollectorFactory to auto trigger compaction for tiering use case. Optimistic transactions and pessimistic transactions with the WriteCommitted policy now support the GetEntityForUpdate API. Added a new count command to the ldb repl shell. By default, it prints a count of keys in the database from start to end. The options --from= and/or --to= can be specified to limit the range. Add rocksdb_writebatch_update_timestamps, rocksdb_writebatch_wi_update_timestamps in C API. Add rocksdb_iter_refresh in C API. Add rocksdb_writebatch_create_with_params, rocksdb_writebatch_wi_create_with_params to create WB and WBWI with all options in C API Public API Changes Deprecated names LogFile and VectorLogPtr in favor of new names WalFile and VectorWalPtr. Introduce a new universal compaction option CompactionOptionsUniversal::max_read_amp which allows user to define the limit on the number of sorted runs separately from the trigger for compaction (level0_file_num_compaction_trigger) https://redirect.github.com/facebook/rocksdb/issues/12477;>#12477. Behavior Changes Inactive WALs are immediately closed upon being fully sync-ed rather than in a background thread. This is to ensure LinkFile() is not called on files still open for write, which might not be supported by some FileSystem implementations. This should not be a performance issue, but an opt-out is available with with new DB option background_close_inactive_wals. Bug Fixes Fix a rare case in which a hard-linked WAL in a Checkpoint is not fully synced (so might lose data on power loss). Fixed the output of the ldb dump_wal command for PutEntity records so it prints the key and correctly resets the hexadecimal formatting flag after printing the wide-column entity. Fixed an issue where PutEntity records were handled incorrectly while rebuilding transactions during recovery. Various read operations could ignore various ReadOptions that might be relevant. Fixed
[PR] IGNITE-22738 Sql: Fix nested subquery optimization [ignite]
alex-plekhanov opened a new pull request, #11437: URL: https://github.com/apache/ignite/pull/11437 Thank you for submitting the pull request to the Apache Ignite. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### The Contribution Checklist - [ ] 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 pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE- Change summary` where `` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html)) ### Notes - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute) - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules) - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines) - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot) If you need any help, please email d...@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22735 Sql. Avoid double parsing of sql queries [ignite-3]
ygerzhedovich commented on code in PR #4085: URL: https://github.com/apache/ignite-3/pull/4085#discussion_r1677991630 ## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/prepare/IgniteSqlToRelConvertor.java: ## @@ -322,4 +324,44 @@ private RelNode convertMerge(SqlMerge call) { relBuilder.build(), LogicalTableModify.Operation.MERGE, targetColumnNameList, null, false); } + +// = Review Comment: I suggest create a ticket with a patch for Calcite and add mention the ticket here -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22735 Sql. Avoid double parsing of sql queries [ignite-3]
ygerzhedovich commented on code in PR #4085: URL: https://github.com/apache/ignite-3/pull/4085#discussion_r1677985512 ## modules/sql-engine/src/main/java/org/apache/ignite/internal/sql/engine/sql/ParserServiceImpl.java: ## @@ -55,12 +56,23 @@ public ParsedResult parse(String query) { assert queryType != null : normalizedQuery; +AtomicReference holder = new AtomicReference<>(parsedTree); + +@SuppressWarnings("UnnecessaryLocalVariable") ParsedResult result = new ParsedResultImpl( queryType, query, normalizedQuery, parsedStatement.dynamicParamsCount(), -() -> IgniteSqlParser.parse(query, StatementParseResult.MODE).statement() +() -> { +SqlNode ast = holder.getAndSet(null); Review Comment: hacker ) -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22662 : Snapshot check as distributed process [ignite]
Vladsz83 commented on code in PR #11391: URL: https://github.com/apache/ignite/pull/11391#discussion_r1677897021 ## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFullCheckDistributedProcess.java: ## @@ -0,0 +1,549 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Function; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.events.DiscoveryEvent; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.management.cache.IdleVerifyResultV2; +import org.apache.ignite.internal.management.cache.PartitionKeyV2; +import org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTaskV2; +import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2; +import org.apache.ignite.internal.util.distributed.DistributedProcess; +import org.apache.ignite.internal.util.future.GridFinishedFuture; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; +import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_CHECK_METAS; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_VALIDATE_PARTS; + +/** Distributed process of snapshot full checking (with the partition hashes). */ +public class SnapshotFullCheckDistributedProcess { +/** */ +private static final IgniteInternalFuture FINISHED_FUT = new GridFinishedFuture<>(); + +/** */ +private final IgniteLogger log; + +/** */ +private final GridKernalContext kctx; + +/** Snapshot check requests per snapshot on every node. */ +final Map requests = new ConcurrentHashMap<>(); + +/** Cluster-wide operation futures per snapshot called from current node. */ +private final Map> clusterOpFuts = new ConcurrentHashMap<>(); + +/** Check metas first phase subprocess. */ +private final DistributedProcess> phase1CheckMetas; + +/** Partition hashes second phase subprocess. */ +private final DistributedProcess> phase2PartsHashes; + +/** */ +public SnapshotFullCheckDistributedProcess(GridKernalContext kctx) { +this.kctx = kctx; + +log = kctx.log(getClass()); + +phase1CheckMetas = new DistributedProcess<>(kctx, SNAPSHOT_CHECK_METAS, this::prepareAndCheckMetas, +this::reducePreparationAndMetasCheck); + +phase2PartsHashes = new DistributedProcess<>(kctx, SNAPSHOT_VALIDATE_PARTS, this::validateParts, +this::reduceValidatePartsAndFinish); + +kctx.event().addLocalEventListener((evt) -> nodeLeft(((DiscoveryEvent)evt).eventNode()), EVT_NODE_FAILED, EVT_NODE_LEFT); Review Comment: I don't think that a code duplication definitely means a problem. IMHO, much worse is a violation of the principles like the encapsulation. SnapshotManager ignores clients: `if (ctx.clientNode()) return;` It won't deliver events to the check process in some cases. Why? Why it should decide what to do with an event instead of the dedicated process? Client can
Re: [PR] IGNITE-22662 : Snapshot check as distributed process [ignite]
Vladsz83 commented on code in PR #11391: URL: https://github.com/apache/ignite/pull/11391#discussion_r1677897021 ## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFullCheckDistributedProcess.java: ## @@ -0,0 +1,549 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Function; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.events.DiscoveryEvent; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.management.cache.IdleVerifyResultV2; +import org.apache.ignite.internal.management.cache.PartitionKeyV2; +import org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTaskV2; +import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2; +import org.apache.ignite.internal.util.distributed.DistributedProcess; +import org.apache.ignite.internal.util.future.GridFinishedFuture; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; +import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_CHECK_METAS; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_VALIDATE_PARTS; + +/** Distributed process of snapshot full checking (with the partition hashes). */ +public class SnapshotFullCheckDistributedProcess { +/** */ +private static final IgniteInternalFuture FINISHED_FUT = new GridFinishedFuture<>(); + +/** */ +private final IgniteLogger log; + +/** */ +private final GridKernalContext kctx; + +/** Snapshot check requests per snapshot on every node. */ +final Map requests = new ConcurrentHashMap<>(); + +/** Cluster-wide operation futures per snapshot called from current node. */ +private final Map> clusterOpFuts = new ConcurrentHashMap<>(); + +/** Check metas first phase subprocess. */ +private final DistributedProcess> phase1CheckMetas; + +/** Partition hashes second phase subprocess. */ +private final DistributedProcess> phase2PartsHashes; + +/** */ +public SnapshotFullCheckDistributedProcess(GridKernalContext kctx) { +this.kctx = kctx; + +log = kctx.log(getClass()); + +phase1CheckMetas = new DistributedProcess<>(kctx, SNAPSHOT_CHECK_METAS, this::prepareAndCheckMetas, +this::reducePreparationAndMetasCheck); + +phase2PartsHashes = new DistributedProcess<>(kctx, SNAPSHOT_VALIDATE_PARTS, this::validateParts, +this::reduceValidatePartsAndFinish); + +kctx.event().addLocalEventListener((evt) -> nodeLeft(((DiscoveryEvent)evt).eventNode()), EVT_NODE_FAILED, EVT_NODE_LEFT); Review Comment: I don't think that a code duplication definitely means a problem. IMHO, much worse is a violation of the principles like the encapsulation. SnapshotManager ignores clients: `if (ctx.clientNode()) return;` It won't deliver events to the check process in some cases. Why? Why it should decide what to do with an event instead of the dedicated process? Client can
Re: [PR] IGNITE-22662 : Snapshot check as distributed process [ignite]
Vladsz83 commented on code in PR #11391: URL: https://github.com/apache/ignite/pull/11391#discussion_r1677897021 ## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotFullCheckDistributedProcess.java: ## @@ -0,0 +1,549 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Function; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.events.DiscoveryEvent; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.management.cache.IdleVerifyResultV2; +import org.apache.ignite.internal.management.cache.PartitionKeyV2; +import org.apache.ignite.internal.management.cache.VerifyBackupPartitionsTaskV2; +import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2; +import org.apache.ignite.internal.util.distributed.DistributedProcess; +import org.apache.ignite.internal.util.future.GridFinishedFuture; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; +import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_CHECK_METAS; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_VALIDATE_PARTS; + +/** Distributed process of snapshot full checking (with the partition hashes). */ +public class SnapshotFullCheckDistributedProcess { +/** */ +private static final IgniteInternalFuture FINISHED_FUT = new GridFinishedFuture<>(); + +/** */ +private final IgniteLogger log; + +/** */ +private final GridKernalContext kctx; + +/** Snapshot check requests per snapshot on every node. */ +final Map requests = new ConcurrentHashMap<>(); + +/** Cluster-wide operation futures per snapshot called from current node. */ +private final Map> clusterOpFuts = new ConcurrentHashMap<>(); + +/** Check metas first phase subprocess. */ +private final DistributedProcess> phase1CheckMetas; + +/** Partition hashes second phase subprocess. */ +private final DistributedProcess> phase2PartsHashes; + +/** */ +public SnapshotFullCheckDistributedProcess(GridKernalContext kctx) { +this.kctx = kctx; + +log = kctx.log(getClass()); + +phase1CheckMetas = new DistributedProcess<>(kctx, SNAPSHOT_CHECK_METAS, this::prepareAndCheckMetas, +this::reducePreparationAndMetasCheck); + +phase2PartsHashes = new DistributedProcess<>(kctx, SNAPSHOT_VALIDATE_PARTS, this::validateParts, +this::reduceValidatePartsAndFinish); + +kctx.event().addLocalEventListener((evt) -> nodeLeft(((DiscoveryEvent)evt).eventNode()), EVT_NODE_FAILED, EVT_NODE_LEFT); Review Comment: I don't think that a code duplication definitely means a problem. IMHO, much worse is a violation of the principles like the encapsulation. SnapshotManager ignores clients: if (ctx.clientNode()) return; It won't deliver events to the check process in some cases. Why? Why it should decide what to do with an event instead of the dedicated process? Client can
Re: [PR] IGNITE-22737 Cleanup comments in the platforms native code [ignite-3]
isapego merged PR #4087: URL: https://github.com/apache/ignite-3/pull/4087 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22715 Support HybridTimestamp in Network serialization [ignite-3]
tkalkirill merged PR #4078: URL: https://github.com/apache/ignite-3/pull/4078 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22736 Fix log buffers position change by unmarshalling process [ignite-3]
ibessonov merged PR #4086: URL: https://github.com/apache/ignite-3/pull/4086 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22736 Fix log buffers position change by unmarshalling process [ignite-3]
ibessonov commented on code in PR #4086: URL: https://github.com/apache/ignite-3/pull/4086#discussion_r1677861023 ## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/marshaller/PartitionCommandsMarshallerImpl.java: ## @@ -43,6 +43,8 @@ protected void beforeWriteMessage(Object o, ByteBuffer buffer) { @Override public T unmarshall(ByteBuffer raw) { +raw = raw.duplicate(); Review Comment: It's a temporary solution while we're migrating to zone-based affinity -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22636 Implement catalog compaction coordinator [ignite-3]
xtern commented on code in PR #4059: URL: https://github.com/apache/ignite-3/pull/4059#discussion_r1677859227 ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogCompactionRunner.java: ## @@ -0,0 +1,343 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog; + +import static java.util.function.Predicate.not; +import static org.apache.ignite.internal.util.IgniteUtils.inBusyLock; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; +import org.apache.ignite.internal.affinity.Assignment; +import org.apache.ignite.internal.affinity.TokenizedAssignments; +import org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor; +import org.apache.ignite.internal.catalog.descriptors.CatalogZoneDescriptor; +import org.apache.ignite.internal.catalog.message.CatalogMessageGroup; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeRequest; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeRequestImpl; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeResponse; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeResponseImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalNode; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyService; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; +import org.apache.ignite.internal.hlc.ClockService; +import org.apache.ignite.internal.hlc.HybridTimestamp; +import org.apache.ignite.internal.logger.IgniteLogger; +import org.apache.ignite.internal.logger.Loggers; +import org.apache.ignite.internal.manager.ComponentContext; +import org.apache.ignite.internal.manager.IgniteComponent; +import org.apache.ignite.internal.network.ClusterNodeImpl; +import org.apache.ignite.internal.network.MessagingService; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.TopologyService; +import org.apache.ignite.internal.placementdriver.PlacementDriver; +import org.apache.ignite.internal.replicator.ReplicationGroupId; +import org.apache.ignite.internal.replicator.TablePartitionId; +import org.apache.ignite.internal.util.CompletableFutures; +import org.apache.ignite.internal.util.IgniteSpinBusyLock; +import org.apache.ignite.network.ClusterNode; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.TestOnly; + +/** + * Catalog compaction runner. + * + * The main goal of this runner is to determine the minimum required catalog version for the cluster + * and the moment when the catalog history up to this version can be safely deleted. + * + * Overall process consists of the following steps: + * + * Routine is triggered after receiving local notification that the low watermark + * has been updated on catalog compaction coordinator (metastorage group leader). + * Coordinator calculates the minimum required time in the cluster + * by sending {@link CatalogMinimumRequiredTimeRequest} to all cluster members. + * If it is considered safe to trim the history up to calculated catalog version + * (at least, all partition owners are present in the logical topology), then the catalog is compacted. + * + */ +public class CatalogCompactionRunner implements IgniteComponent { +private static final IgniteLogger LOG = Loggers.forClass(CatalogCompactionRunner.class); + +private static final long ANSWER_TIMEOUT = 5_000; + +private final CatalogManagerImpl catalogManager; + +private final MessagingService messagingService; + +private final TopologyService topologyService; + +private final LogicalTopologyService logicalTopologyService; + +private final PlacementDriver placementDriver; + +private final ClockService clockService; + +
Re: [PR] IGNITE-22636 Implement catalog compaction coordinator [ignite-3]
xtern commented on code in PR #4059: URL: https://github.com/apache/ignite-3/pull/4059#discussion_r1677858799 ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogCompactionRunner.java: ## @@ -0,0 +1,343 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog; + +import static java.util.function.Predicate.not; +import static org.apache.ignite.internal.util.IgniteUtils.inBusyLock; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; +import org.apache.ignite.internal.affinity.Assignment; +import org.apache.ignite.internal.affinity.TokenizedAssignments; +import org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor; +import org.apache.ignite.internal.catalog.descriptors.CatalogZoneDescriptor; +import org.apache.ignite.internal.catalog.message.CatalogMessageGroup; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeRequest; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeRequestImpl; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeResponse; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeResponseImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalNode; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyService; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; +import org.apache.ignite.internal.hlc.ClockService; +import org.apache.ignite.internal.hlc.HybridTimestamp; +import org.apache.ignite.internal.logger.IgniteLogger; +import org.apache.ignite.internal.logger.Loggers; +import org.apache.ignite.internal.manager.ComponentContext; +import org.apache.ignite.internal.manager.IgniteComponent; +import org.apache.ignite.internal.network.ClusterNodeImpl; +import org.apache.ignite.internal.network.MessagingService; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.TopologyService; +import org.apache.ignite.internal.placementdriver.PlacementDriver; +import org.apache.ignite.internal.replicator.ReplicationGroupId; +import org.apache.ignite.internal.replicator.TablePartitionId; +import org.apache.ignite.internal.util.CompletableFutures; +import org.apache.ignite.internal.util.IgniteSpinBusyLock; +import org.apache.ignite.network.ClusterNode; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.TestOnly; + +/** + * Catalog compaction runner. + * + * The main goal of this runner is to determine the minimum required catalog version for the cluster + * and the moment when the catalog history up to this version can be safely deleted. + * + * Overall process consists of the following steps: + * + * Routine is triggered after receiving local notification that the low watermark + * has been updated on catalog compaction coordinator (metastorage group leader). + * Coordinator calculates the minimum required time in the cluster + * by sending {@link CatalogMinimumRequiredTimeRequest} to all cluster members. + * If it is considered safe to trim the history up to calculated catalog version + * (at least, all partition owners are present in the logical topology), then the catalog is compacted. + * + */ +public class CatalogCompactionRunner implements IgniteComponent { +private static final IgniteLogger LOG = Loggers.forClass(CatalogCompactionRunner.class); + +private static final long ANSWER_TIMEOUT = 5_000; + +private final CatalogManagerImpl catalogManager; + +private final MessagingService messagingService; + +private final TopologyService topologyService; + +private final LogicalTopologyService logicalTopologyService; + +private final PlacementDriver placementDriver; + +private final ClockService clockService; + +
Re: [PR] IGNITE-22636 Implement catalog compaction coordinator [ignite-3]
xtern commented on code in PR #4059: URL: https://github.com/apache/ignite-3/pull/4059#discussion_r1677853358 ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/message/CatalogMinimumRequiredTimeRequest.java: ## @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog.message; + +import java.io.Serializable; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.annotations.Transferable; + +/** + * Request to obtain the minimum timestamp to which, from the local + * node's perspective, the catalog history can be safely truncated. + */ +@Transferable(CatalogMessageGroup.MINIMUM_REQUIRED_TIME_REQUEST) +public interface CatalogMinimumRequiredTimeRequest extends NetworkMessage, Serializable { Review Comment: Fixed. thanks. ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/message/CatalogMinimumRequiredTimeResponse.java: ## @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog.message; + +import java.io.Serializable; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.annotations.Transferable; + +/** + * Response message containing the low watermark required for the local node. + * This watermark is used to safely truncate catalog history. + */ +@Transferable(CatalogMessageGroup.MINIMUM_REQUIRED_TIME_RESPONSE) +public interface CatalogMinimumRequiredTimeResponse extends NetworkMessage, Serializable { Review Comment: Fixed. thanks. ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogCompactionRunner.java: ## @@ -0,0 +1,343 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog; + +import static java.util.function.Predicate.not; +import static org.apache.ignite.internal.util.IgniteUtils.inBusyLock; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; +import org.apache.ignite.internal.affinity.Assignment; +import org.apache.ignite.internal.affinity.TokenizedAssignments; +import org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor; +import org.apache.ignite.internal.catalog.descriptors.CatalogZoneDescriptor; +import
Re: [PR] IGNITE-22736 Fix log buffers position change by unmarshalling process [ignite-3]
sashapolo commented on code in PR #4086: URL: https://github.com/apache/ignite-3/pull/4086#discussion_r1677841079 ## modules/partition-replicator/src/main/java/org/apache/ignite/internal/partition/replicator/marshaller/PartitionCommandsMarshallerImpl.java: ## @@ -43,6 +43,8 @@ protected void beforeWriteMessage(Object o, ByteBuffer buffer) { @Override public T unmarshall(ByteBuffer raw) { +raw = raw.duplicate(); Review Comment: Why do we have two identical classes? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22710 Add exception translation to Transaction implementations [ignite-3]
rpuch commented on code in PR #4070: URL: https://github.com/apache/ignite-3/pull/4070#discussion_r1677836570 ## modules/transactions/src/test/java/org/apache/ignite/internal/tx/TxManagerTest.java: ## @@ -343,7 +343,10 @@ void testRepeatedCommitRollbackAfterCommitWithException() throws Exception { TransactionException transactionException = assertThrows(TransactionException.class, tx::commit); -assertInstanceOf(MismatchingTransactionOutcomeException.class, ExceptionUtils.unwrapCause(transactionException.getCause())); +assertInstanceOf( +MismatchingTransactionOutcomeException.class, + ExceptionUtils.unwrapCause(transactionException.getCause().getCause().getCause()) Review Comment: Changed to `IgniteTestUtils.hasCause()` -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22710 Add exception translation to Transaction implementations [ignite-3]
rpuch commented on code in PR #4070: URL: https://github.com/apache/ignite-3/pull/4070#discussion_r1677836170 ## modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TransactionsExceptionMapperUtil.java: ## @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.tx.impl; + +import static org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapToPublicException; +import static org.apache.ignite.internal.util.CompletableFutures.isCompletedSuccessfully; +import static org.apache.ignite.internal.util.ExceptionUtils.unwrapCause; + +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import org.apache.ignite.lang.TraceableException; +import org.apache.ignite.tx.Transaction; +import org.apache.ignite.tx.TransactionException; + +/** + * Utils for mapping exceptions that is specific to the {@link Transaction} context. + */ +class TransactionsExceptionMapperUtil { +/** + * Returns a new CompletableFuture that, when the given {@code origin} future completes exceptionally, maps the origin's exception to a + * public Ignite exception if it is needed. The mapping is made in the context of {@link Transaction} methods. + * + * @param origin The future to use to create a new stage. + * @param Type os result. + * @return New CompletableFuture. + */ +static CompletableFuture convertToPublicFuture(CompletableFuture origin, int defaultCode) { +if (isCompletedSuccessfully(origin)) { +// No need to translate exceptions. +return origin; +} + +return origin +.handle((res, err) -> { +if (err != null) { +throw new CompletionException(mapToPublicTransactionException(unwrapCause(err), defaultCode)); +} + +return res; +}); +} + +private static Throwable mapToPublicTransactionException(Throwable origin, int defaultCode) { +if (origin instanceof PrimaryReplicaExpiredException) { Review Comment: Good catch, thanks! Removed it from from `TransactionExceptionMapperProvider` -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22710 Add exception translation to Transaction implementations [ignite-3]
rpuch commented on code in PR #4070: URL: https://github.com/apache/ignite-3/pull/4070#discussion_r1677835432 ## modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteExceptionMapperUtil.java: ## @@ -115,7 +136,7 @@ public static Throwable mapToPublicException(Throwable origin) { } // There are no exception mappings for the given exception. This case should be considered as internal error. -return new IgniteException(INTERNAL_ERR, origin); +return unknownProblemMapper.apply(origin); Review Comment: Added an assertion -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22737 Cleanup comments in the platforms native code [ignite-3]
arcolight opened a new pull request, #4087: URL: https://github.com/apache/ignite-3/pull/4087 https://issues.apache.org/jira/browse/IGNITE-22737 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22662 : Snapshot check as distributed process [ignite]
Vladsz83 commented on code in PR #11391: URL: https://github.com/apache/ignite/pull/11391#discussion_r1677835291 ## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotCheckProcess.java: ## @@ -0,0 +1,543 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Function; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.events.DiscoveryEvent; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.management.cache.IdleVerifyResultV2; +import org.apache.ignite.internal.management.cache.PartitionKeyV2; +import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2; +import org.apache.ignite.internal.util.distributed.DistributedProcess; +import org.apache.ignite.internal.util.future.GridFinishedFuture; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; +import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_CHECK_METAS; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_VALIDATE_PARTS; + +/** Distributed process of snapshot checking (with the partition hashes). */ +public class SnapshotCheckProcess { +/** */ +private final IgniteLogger log; + +/** */ +private final GridKernalContext kctx; + +/** Snapshot check requests per snapshot on every node. */ +private final Map requests = new ConcurrentHashMap<>(); + +/** Cluster-wide operation futures per snapshot called from current node. */ +private final Map> clusterOpFuts = new ConcurrentHashMap<>(); + +/** Check metas first phase subprocess. */ +private final DistributedProcess> phase1CheckMetas; + +/** Partition hashes second phase subprocess. */ +private final DistributedProcess> phase2PartsHashes; + +/** */ +public SnapshotCheckProcess(GridKernalContext kctx) { +this.kctx = kctx; + +log = kctx.log(getClass()); + +phase1CheckMetas = new DistributedProcess<>(kctx, SNAPSHOT_CHECK_METAS, this::prepareAndCheckMetas, +this::reducePreparationAndMetasCheck); + +phase2PartsHashes = new DistributedProcess<>(kctx, SNAPSHOT_VALIDATE_PARTS, this::validateParts, +this::reduceValidatePartsAndFinish); + +kctx.event().addLocalEventListener((evt) -> nodeLeft(((DiscoveryEvent)evt).eventNode()), EVT_NODE_FAILED, EVT_NODE_LEFT); +} + +/** */ +Map requests() { +return Collections.unmodifiableMap(requests); +} + +/** + * Stops the process with the passed exception. + * + * @param th The interrupt reason. + * @param rqFilter If not {@code null}, used to filter which requests/process to stop. If {@code null}, stops all the validations. + */ +public void interrupt(Throwable th, @Nullable Function rqFilter) { +requests.values().forEach(rq -> { +if (rqFilter == null || rqFilter.apply(rq)) { +rq.error(th); + +clean(rq.requestId(), th, null, null); +} +
[PR] IGNITE-22736 Fix log buffers position change by unmarshalling process [ignite-3]
ibessonov opened a new pull request, #4086: URL: https://github.com/apache/ignite-3/pull/4086 https://issues.apache.org/jira/browse/IGNITE-22736 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22735 Sql. Avoid double parsing of sql queries [ignite-3]
korlov42 opened a new pull request, #4085: URL: https://github.com/apache/ignite-3/pull/4085 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva merged PR #11426: URL: https://github.com/apache/ignite/pull/11426 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22581 Add planner test to verify numeric type coercion of source for INSERT, UPDATE and MERGE operators [ignite-3]
korlov42 commented on code in PR #4045: URL: https://github.com/apache/ignite-3/pull/4045#discussion_r1677725265 ## modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/planner/datatypes/InsertSourcesCoercionTest.java: ## @@ -0,0 +1,665 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.sql.engine.planner.datatypes; + +import static org.hamcrest.MatcherAssert.assertThat; + +import java.util.EnumMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Stream; +import org.apache.calcite.rex.RexNode; +import org.apache.ignite.internal.sql.engine.planner.datatypes.utils.NumericPair; +import org.apache.ignite.internal.sql.engine.planner.datatypes.utils.TypePair; +import org.apache.ignite.internal.sql.engine.planner.datatypes.utils.Types; +import org.apache.ignite.internal.sql.engine.rel.IgniteKeyValueModify; +import org.apache.ignite.internal.sql.engine.rel.IgniteRel; +import org.apache.ignite.internal.sql.engine.schema.IgniteSchema; +import org.apache.ignite.internal.sql.engine.util.SqlTestUtils; +import org.apache.ignite.internal.type.NativeTypeSpec; +import org.apache.ignite.internal.type.NativeTypes; +import org.hamcrest.BaseMatcher; +import org.hamcrest.Description; +import org.hamcrest.Matcher; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +/** + * A set of test to verify behavior of type coercion for INSERT operations, when values belongs to the NUMERIC type family. + * + * This tests aim to help to understand in which cases implicit cast will be added to which values. + */ +public class InsertSourcesCoercionTest extends BaseTypeCoercionTest { Review Comment: you forgot to update `MergeSourcesCoercionTest` -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22728 Switch to a different Gradle CMake plugin. [ignite-3]
sashapolo merged PR #4082: URL: https://github.com/apache/ignite-3/pull/4082 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-21771 Removed unnecessary TODO [ignite-3]
tkalkirill merged PR #4084: URL: https://github.com/apache/ignite-3/pull/4084 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22734 update jetty [ignite]
nao-it opened a new pull request, #11436: URL: https://github.com/apache/ignite/pull/11436 Thank you for submitting the pull request to the Apache Ignite. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### The Contribution Checklist - [ ] 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 pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE- Change summary` where `` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html)) ### Notes - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute) - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules) - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines) - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot) If you need any help, please email d...@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-21771 Removed unnecessary TODO [ignite-3]
tkalkirill opened a new pull request, #4084: URL: https://github.com/apache/ignite-3/pull/4084 https://issues.apache.org/jira/browse/IGNITE-21771 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22636 Implement catalog compaction coordinator [ignite-3]
korlov42 commented on code in PR #4059: URL: https://github.com/apache/ignite-3/pull/4059#discussion_r1677427539 ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/message/CatalogMinimumRequiredTimeRequest.java: ## @@ -0,0 +1,31 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog.message; + +import java.io.Serializable; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.annotations.Transferable; + +/** + * Request to obtain the minimum timestamp to which, from the local + * node's perspective, the catalog history can be safely truncated. + */ +@Transferable(CatalogMessageGroup.MINIMUM_REQUIRED_TIME_REQUEST) +public interface CatalogMinimumRequiredTimeRequest extends NetworkMessage, Serializable { Review Comment: why `Serializable `? ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/message/CatalogMinimumRequiredTimeResponse.java: ## @@ -0,0 +1,32 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog.message; + +import java.io.Serializable; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.annotations.Transferable; + +/** + * Response message containing the low watermark required for the local node. + * This watermark is used to safely truncate catalog history. + */ +@Transferable(CatalogMessageGroup.MINIMUM_REQUIRED_TIME_RESPONSE) +public interface CatalogMinimumRequiredTimeResponse extends NetworkMessage, Serializable { Review Comment: why `Serializable `? ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogCompactionRunner.java: ## @@ -0,0 +1,343 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog; + +import static java.util.function.Predicate.not; +import static org.apache.ignite.internal.util.IgniteUtils.inBusyLock; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; +import org.apache.ignite.internal.affinity.Assignment; +import org.apache.ignite.internal.affinity.TokenizedAssignments; +import org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor; +import org.apache.ignite.internal.catalog.descriptors.CatalogZoneDescriptor; +import
[PR] IGNITE-22731 update zookeeper [ignite]
nao-it opened a new pull request, #11435: URL: https://github.com/apache/ignite/pull/11435 Thank you for submitting the pull request to the Apache Ignite. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### The Contribution Checklist - [ ] 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 pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE- Change summary` where `` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html)) ### Notes - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute) - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules) - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines) - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot) If you need any help, please email d...@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22710 Add exception translation to Transaction implementations [ignite-3]
sk0x50 commented on code in PR #4070: URL: https://github.com/apache/ignite-3/pull/4070#discussion_r1677565841 ## modules/transactions/src/test/java/org/apache/ignite/internal/tx/TxManagerTest.java: ## @@ -343,7 +343,10 @@ void testRepeatedCommitRollbackAfterCommitWithException() throws Exception { TransactionException transactionException = assertThrows(TransactionException.class, tx::commit); -assertInstanceOf(MismatchingTransactionOutcomeException.class, ExceptionUtils.unwrapCause(transactionException.getCause())); +assertInstanceOf( +MismatchingTransactionOutcomeException.class, + ExceptionUtils.unwrapCause(transactionException.getCause().getCause().getCause()) Review Comment: Perhaps, using `IgniteTestUtils.hasCause` would be more readable. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22710 Add exception translation to Transaction implementations [ignite-3]
sk0x50 commented on code in PR #4070: URL: https://github.com/apache/ignite-3/pull/4070#discussion_r1677552558 ## modules/transactions/src/main/java/org/apache/ignite/internal/tx/impl/TransactionsExceptionMapperUtil.java: ## @@ -0,0 +1,85 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.tx.impl; + +import static org.apache.ignite.internal.lang.IgniteExceptionMapperUtil.mapToPublicException; +import static org.apache.ignite.internal.util.CompletableFutures.isCompletedSuccessfully; +import static org.apache.ignite.internal.util.ExceptionUtils.unwrapCause; + +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.CompletionException; +import org.apache.ignite.lang.TraceableException; +import org.apache.ignite.tx.Transaction; +import org.apache.ignite.tx.TransactionException; + +/** + * Utils for mapping exceptions that is specific to the {@link Transaction} context. + */ +class TransactionsExceptionMapperUtil { +/** + * Returns a new CompletableFuture that, when the given {@code origin} future completes exceptionally, maps the origin's exception to a + * public Ignite exception if it is needed. The mapping is made in the context of {@link Transaction} methods. + * + * @param origin The future to use to create a new stage. + * @param Type os result. + * @return New CompletableFuture. + */ +static CompletableFuture convertToPublicFuture(CompletableFuture origin, int defaultCode) { +if (isCompletedSuccessfully(origin)) { +// No need to translate exceptions. +return origin; +} + +return origin +.handle((res, err) -> { +if (err != null) { +throw new CompletionException(mapToPublicTransactionException(unwrapCause(err), defaultCode)); +} + +return res; +}); +} + +private static Throwable mapToPublicTransactionException(Throwable origin, int defaultCode) { +if (origin instanceof PrimaryReplicaExpiredException) { Review Comment: You have already added `PrimaryReplicaExpiredException` to the `TransactionExceptionMapperProvider`. So, what is the reason for mapping it here? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22710 Add exception translation to Transaction implementations [ignite-3]
sk0x50 commented on code in PR #4070: URL: https://github.com/apache/ignite-3/pull/4070#discussion_r1677547200 ## modules/core/src/main/java/org/apache/ignite/internal/lang/IgniteExceptionMapperUtil.java: ## @@ -115,7 +136,7 @@ public static Throwable mapToPublicException(Throwable origin) { } // There are no exception mappings for the given exception. This case should be considered as internal error. -return new IgniteException(INTERNAL_ERR, origin); +return unknownProblemMapper.apply(origin); Review Comment: Should we check that `unknownProblemMapper` returns an instance of the `public` exception? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] vacuum extra log [ignite-3]
denis-chudov opened a new pull request, #4083: URL: https://github.com/apache/ignite-3/pull/4083 (no comment) -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Spring boot 3 support for Ignite [ignite]
sk0x50 commented on issue #11362: URL: https://github.com/apache/ignite/issues/11362#issuecomment-2228018839 There is a ticket to support the Spring Boot 3.x version. [IGNITE-22528](https://issues.apache.org/jira/browse/IGNITE-22528) It has not yet been implemented, so the target release version has not been determined. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22310 Do not log slow network processing in storage threads [ignite-3]
sanpwc merged PR #4079: URL: https://github.com/apache/ignite-3/pull/4079 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22720 Get rid of CatalogIndexDescriptor#txWaitCatalogVersion [ignite-3]
tkalkirill merged PR #4080: URL: https://github.com/apache/ignite-3/pull/4080 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22726 Add Github CI check for javadocs [ignite]
timoninmaxim merged PR #11434: URL: https://github.com/apache/ignite/pull/11434 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump io.github.goooler.shadow from 8.1.7 to 8.1.8 [ignite-3]
ptupitsyn merged PR #3995: URL: https://github.com/apache/ignite-3/pull/3995 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Question: Querying Ignite Cache with Eviction and external storage enabled [ignite]
ptupitsyn closed issue #11433: Question: Querying Ignite Cache with Eviction and external storage enabled URL: https://github.com/apache/ignite/issues/11433 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22728 Switch to a different Gradle CMake plugin. [ignite-3]
sashapolo opened a new pull request, #4082: URL: https://github.com/apache/ignite-3/pull/4082 https://issues.apache.org/jira/browse/IGNITE-22728 This fixes hanging Platform module build on Mac. 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Question: Querying Ignite Cache with Eviction and external storage enabled [ignite]
ratadepally commented on issue #11433: URL: https://github.com/apache/ignite/issues/11433#issuecomment-2226228200 @ptupitsyn - thank you for the quick response. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22726 Add Github CI check for javadocs [ignite]
timoninmaxim opened a new pull request, #11434: URL: https://github.com/apache/ignite/pull/11434 Thank you for submitting the pull request to the Apache Ignite. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### The Contribution Checklist - [ ] 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 pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE- Change summary` where `` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html)) ### Notes - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute) - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules) - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines) - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot) If you need any help, please email d...@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22662 : Snapshot check as distributed process [ignite]
timoninmaxim commented on code in PR #11391: URL: https://github.com/apache/ignite/pull/11391#discussion_r1676134447 ## modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotCheckProcess.java: ## @@ -0,0 +1,543 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.processors.cache.persistence.snapshot; + +import java.io.File; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; +import java.util.UUID; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.ThreadLocalRandom; +import java.util.function.Function; +import java.util.stream.Collectors; +import org.apache.ignite.IgniteCheckedException; +import org.apache.ignite.IgniteException; +import org.apache.ignite.IgniteLogger; +import org.apache.ignite.cluster.ClusterNode; +import org.apache.ignite.events.DiscoveryEvent; +import org.apache.ignite.internal.GridKernalContext; +import org.apache.ignite.internal.IgniteInternalFuture; +import org.apache.ignite.internal.cluster.ClusterTopologyCheckedException; +import org.apache.ignite.internal.management.cache.IdleVerifyResultV2; +import org.apache.ignite.internal.management.cache.PartitionKeyV2; +import org.apache.ignite.internal.processors.cache.verify.PartitionHashRecordV2; +import org.apache.ignite.internal.util.distributed.DistributedProcess; +import org.apache.ignite.internal.util.future.GridFinishedFuture; +import org.apache.ignite.internal.util.future.GridFutureAdapter; +import org.apache.ignite.internal.util.typedef.F; +import org.apache.ignite.internal.util.typedef.internal.CU; +import org.jetbrains.annotations.Nullable; + +import static org.apache.ignite.events.EventType.EVT_NODE_FAILED; +import static org.apache.ignite.events.EventType.EVT_NODE_LEFT; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_CHECK_METAS; +import static org.apache.ignite.internal.util.distributed.DistributedProcess.DistributedProcessType.SNAPSHOT_VALIDATE_PARTS; + +/** Distributed process of snapshot checking (with the partition hashes). */ +public class SnapshotCheckProcess { +/** */ +private final IgniteLogger log; + +/** */ +private final GridKernalContext kctx; + +/** Snapshot check requests per snapshot on every node. */ +private final Map requests = new ConcurrentHashMap<>(); + +/** Cluster-wide operation futures per snapshot called from current node. */ +private final Map> clusterOpFuts = new ConcurrentHashMap<>(); + +/** Check metas first phase subprocess. */ +private final DistributedProcess> phase1CheckMetas; + +/** Partition hashes second phase subprocess. */ +private final DistributedProcess> phase2PartsHashes; + +/** */ +public SnapshotCheckProcess(GridKernalContext kctx) { +this.kctx = kctx; + +log = kctx.log(getClass()); + +phase1CheckMetas = new DistributedProcess<>(kctx, SNAPSHOT_CHECK_METAS, this::prepareAndCheckMetas, +this::reducePreparationAndMetasCheck); + +phase2PartsHashes = new DistributedProcess<>(kctx, SNAPSHOT_VALIDATE_PARTS, this::validateParts, +this::reduceValidatePartsAndFinish); + +kctx.event().addLocalEventListener((evt) -> nodeLeft(((DiscoveryEvent)evt).eventNode()), EVT_NODE_FAILED, EVT_NODE_LEFT); +} + +/** */ +Map requests() { +return Collections.unmodifiableMap(requests); +} + +/** + * Stops the process with the passed exception. + * + * @param th The interrupt reason. + * @param rqFilter If not {@code null}, used to filter which requests/process to stop. If {@code null}, stops all the validations. + */ +public void interrupt(Throwable th, @Nullable Function rqFilter) { +requests.values().forEach(rq -> { +if (rqFilter == null || rqFilter.apply(rq)) { +rq.error(th); + +clean(rq.requestId(), th, null, null); +} +
[PR] Bump com.github.spotbugs from 6.0.18 to 6.0.19 [ignite-3]
dependabot[bot] opened a new pull request, #4081: URL: https://github.com/apache/ignite-3/pull/4081 Bumps com.github.spotbugs from 6.0.18 to 6.0.19. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.github.spotbugs=gradle=6.0.18=6.0.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22720 Get rid of CatalogIndexDescriptor#txWaitCatalogVersion [ignite-3]
tkalkirill opened a new pull request, #4080: URL: https://github.com/apache/ignite-3/pull/4080 https://issues.apache.org/jira/browse/IGNITE-22720 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
tkalkirill merged PR #4072: URL: https://github.com/apache/ignite-3/pull/4072 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
tkalkirill commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675719263 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -245,7 +245,8 @@ private CompletableFuture awaitPrimaryReplica() { Throwable cause = unwrapCause(throwable); if (cause instanceof PrimaryReplicaAwaitTimeoutException) { -return awaitPrimaryReplica(); +return +awaitPrimaryReplica(); Review Comment: Yep, thanks! -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
rpuch commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675717195 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -245,7 +245,8 @@ private CompletableFuture awaitPrimaryReplica() { Throwable cause = unwrapCause(throwable); if (cause instanceof PrimaryReplicaAwaitTimeoutException) { -return awaitPrimaryReplica(); +return +awaitPrimaryReplica(); Review Comment: A typo? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22714 Use IndexMeta in PartitionReplicaListener [ignite-3]
tkalkirill merged PR #4077: URL: https://github.com/apache/ignite-3/pull/4077 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22708 Do not start distributionZoneRebalanceEngineV2 without f… [ignite-3]
sanpwc merged PR #4074: URL: https://github.com/apache/ignite-3/pull/4074 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22353 Basic Python DB API Driver [ignite-3]
isapego merged PR #4075: URL: https://github.com/apache/ignite-3/pull/4075 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
rpuch commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675640969 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { +return failedFuture(t); } finally { leaveBusy(); } } + +private MetaIndexStatusChange statusChange() { +IndexMeta indexMeta = indexMetaStorage.indexMeta(indexDescriptor.id()); + +if (indexMeta == null) { +// Index was destroyed under a low watermark, well, we need to build it. +throw new IndexTaskStoppingException(); +} + +MetaIndexStatusChange statusChange = indexMeta.statusChangeNullable(MetaIndexStatus.convert(indexDescriptor.status())); + +assert statusChange != null : IgniteStringFormatter.format("Missing index status change: [indexId={}, catalogStatus={}]", Review Comment: This is not a hot code, so we can check for null properly at each invocation and not use assertion for this. It's much better to see a `null` right away than deal with an NPE later on. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22310 Do not log slow network processing in storage threads [ignite-3]
Cyrill opened a new pull request, #4079: URL: https://github.com/apache/ignite-3/pull/4079 https://issues.apache.org/jira/browse/IGNITE-22310 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
tkalkirill commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675631034 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { Review Comment: I didn't fully understand you. This method will return a fallen future with an error that it looks more correct, and processing this error, including logging, should not happen here. There is already processing in **org.apache.ignite.internal.index.ChangeIndexStatusTask#start**. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
tkalkirill commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675626767 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { +return failedFuture(t); } finally { leaveBusy(); } } + +private MetaIndexStatusChange statusChange() { +IndexMeta indexMeta = indexMetaStorage.indexMeta(indexDescriptor.id()); + +if (indexMeta == null) { +// Index was destroyed under a low watermark, well, we need to build it. +throw new IndexTaskStoppingException(); +} + +MetaIndexStatusChange statusChange = indexMeta.statusChangeNullable(MetaIndexStatus.convert(indexDescriptor.status())); + +assert statusChange != null : IgniteStringFormatter.format("Missing index status change: [indexId={}, catalogStatus={}]", Review Comment: Yes, this is not a hot code and it shouldn’t be, so let’s leave it as an assertion for now. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
tkalkirill commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675625617 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { +return failedFuture(t); } finally { leaveBusy(); } } + +private MetaIndexStatusChange statusChange() { +IndexMeta indexMeta = indexMetaStorage.indexMeta(indexDescriptor.id()); + +if (indexMeta == null) { +// Index was destroyed under a low watermark, well, we need to build it. Review Comment: I made a mistake, I fixed it. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Question: Querying Ignite Cache with Eviction and external storage enabled [ignite]
ptupitsyn commented on issue #11433: URL: https://github.com/apache/ignite/issues/11433#issuecomment-2225127187 Ignite SQL [does not load data from external storage](https://ignite.apache.org/docs/latest/persistence/external-storage). I suggest using [native Ignite persistence](https://ignite.apache.org/docs/latest/persistence/native-persistence) instead of external storage for data recovery. In this case SQL is fully supported. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva commented on PR #11426: URL: https://github.com/apache/ignite/pull/11426#issuecomment-2225029574 https://mtcga.gridgain.com/pr.html?serverId=apache=IgniteTests24Java8_RunAll=pull/11426/head=Latest -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22715 Support HybridTimestamp in Network serialization [ignite-3]
tkalkirill opened a new pull request, #4078: URL: https://github.com/apache/ignite-3/pull/4078 https://issues.apache.org/jira/browse/IGNITE-22715 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva commented on PR #11426: URL: https://github.com/apache/ignite/pull/11426#issuecomment-2225010379 @makalis LGTM. Thanks for contribution! -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
makalis commented on code in PR #11426: URL: https://github.com/apache/ignite/pull/11426#discussion_r1675419001 ## modules/opencensus/pom.xml: ## @@ -100,14 +100,12 @@ io.opencensus opencensus-exporter-stats-prometheus ${opencensus.version} -test Review Comment: For now opencensus-exporter-trace-zipkin scope is test in AI, and my goal is to make metrics work, not traces. So I suggest to leave it as is for now for it. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22713: Sql. Move timeout scheduling code to ExecutionContext [ignite-3]
ygerzhedovich merged PR #4073: URL: https://github.com/apache/ignite-3/pull/4073 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
rpuch commented on code in PR #4072: URL: https://github.com/apache/ignite-3/pull/4072#discussion_r1675394117 ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { Review Comment: We should not swallow `Error`s (which are not `AssertionError`). For them, we should probably log them and rethrow them after this. ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { +return failedFuture(t); } finally { leaveBusy(); } } + +private MetaIndexStatusChange statusChange() { +IndexMeta indexMeta = indexMetaStorage.indexMeta(indexDescriptor.id()); + +if (indexMeta == null) { +// Index was destroyed under a low watermark, well, we need to build it. +throw new IndexTaskStoppingException(); +} + +MetaIndexStatusChange statusChange = indexMeta.statusChangeNullable(MetaIndexStatus.convert(indexDescriptor.status())); + +assert statusChange != null : IgniteStringFormatter.format("Missing index status change: [indexId={}, catalogStatus={}]", Review Comment: What if we run without assertions? We'll just return null and get an NPE further. How about using `Objects#requireNonNull()` instead of asserting? This doesn't seem to be a hot code. ## modules/index/src/main/java/org/apache/ignite/internal/index/ChangeIndexStatusTask.java: ## @@ -333,8 +335,26 @@ private CompletableFuture inBusyLocks(Supplier> supp try { return supplier.get(); +} catch (Throwable t) { +return failedFuture(t); } finally { leaveBusy(); } } + +private MetaIndexStatusChange statusChange() { +IndexMeta indexMeta = indexMetaStorage.indexMeta(indexDescriptor.id()); + +if (indexMeta == null) { +// Index was destroyed under a low watermark, well, we need to build it. Review Comment: The comment says that the index was already destroyed, but it also says that it needs to build it. Is this a typo? Should it say that it does NOT need to build it anymore? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22714 Use IndexMeta in PartitionReplicaListener [ignite-3]
tkalkirill opened a new pull request, #4077: URL: https://github.com/apache/ignite-3/pull/4077 https://issues.apache.org/jira/browse/IGNITE-22714 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva commented on code in PR #11426: URL: https://github.com/apache/ignite/pull/11426#discussion_r1675028381 ## modules/opencensus/pom.xml: ## @@ -100,14 +100,12 @@ io.opencensus opencensus-exporter-stats-prometheus ${opencensus.version} -test Review Comment: But what about zipkin exporter can we fix it too? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva commented on code in PR #11426: URL: https://github.com/apache/ignite/pull/11426#discussion_r1675027195 ## modules/opencensus/pom.xml: ## @@ -100,14 +100,12 @@ io.opencensus opencensus-exporter-stats-prometheus ${opencensus.version} -test Review Comment: But what about zipkin exporter can we fix it too? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva commented on code in PR #11426: URL: https://github.com/apache/ignite/pull/11426#discussion_r1675027195 ## modules/opencensus/pom.xml: ## @@ -100,14 +100,12 @@ io.opencensus opencensus-exporter-stats-prometheus ${opencensus.version} -test Review Comment: But what about zipkin exporter can we fix it too? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22353 Basic Python DB API Driver [ignite-3]
isapego commented on code in PR #4075: URL: https://github.com/apache/ignite-3/pull/4075#discussion_r1674678211 ## modules/platforms/python/cpp_module/py_connection.cpp: ## @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include + +#include "module.h" +#include "py_connection.h" + +#include + +int py_connection_init(py_connection *self, PyObject *args, PyObject *kwds) +{ +UNUSED_VALUE args; +UNUSED_VALUE kwds; + +self->m_env = nullptr; +self->m_conn = nullptr; + +return 0; +} + +void py_connection_dealloc(py_connection *self) +{ +delete self->m_conn; +delete self->m_env; + +self->m_conn = nullptr; +self->m_env = nullptr; + +Py_TYPE(self)->tp_free(self); +} + +static PyObject* py_connection_close(py_connection* self, PyObject*) +{ +if (self->m_conn) { +self->m_conn->release(); +if (!check_errors(*self->m_conn)) +return nullptr; Review Comment: No, in this case neither `self->m_conn`, nor `self->m_env` are deleted until the connection is released. If there is an error during connection close, it probably means, connection was already closed with fail anyway. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22353 Basic Python DB API Driver [ignite-3]
isapego commented on code in PR #4075: URL: https://github.com/apache/ignite-3/pull/4075#discussion_r1674678211 ## modules/platforms/python/cpp_module/py_connection.cpp: ## @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include + +#include "module.h" +#include "py_connection.h" + +#include + +int py_connection_init(py_connection *self, PyObject *args, PyObject *kwds) +{ +UNUSED_VALUE args; +UNUSED_VALUE kwds; + +self->m_env = nullptr; +self->m_conn = nullptr; + +return 0; +} + +void py_connection_dealloc(py_connection *self) +{ +delete self->m_conn; +delete self->m_env; + +self->m_conn = nullptr; +self->m_env = nullptr; + +Py_TYPE(self)->tp_free(self); +} + +static PyObject* py_connection_close(py_connection* self, PyObject*) +{ +if (self->m_conn) { +self->m_conn->release(); +if (!check_errors(*self->m_conn)) +return nullptr; Review Comment: No, in this case neither `self->m_conn`, nor `self->m_env` are deleted until the connection is released. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[I] Question: Querying Ignite Cache with Eviction and external storage enabled [ignite]
ratadepally opened a new issue, #11433: URL: https://github.com/apache/ignite/issues/11433 Hi, We are currently working on a scenario where we have cache with some of the below configuration. 1. Dedicated data region with min and max provided and eviction enabled with with Random-2-LRU. 2. External storage persistence for data recovery. 3. two backups With the above setup we have come across a behavior where if the data from the cache reaches its limit the data is automatically getting evicted which is expected. But the issue we are currently facing is that we are not able to query the data which is evicted using SQL API as the data is not longer present in **OFF HEAP** memory. Also when eviction happens can we still retrieve the data from the configured backups or they will be evicted as well? In this case the only way to get the data is to explicitly call either of below methods. 1. cache.get(ID) - This will load specific Key data onto off heap memory which will then be available for querying 2. cache.loadCache() - In this case do we need to call the method every time we need to retrieve a specific key from cache data or for every transaction as the data we are looking for might not be in cache due to eviction in place? Can you please suggest any approach where we can perform SQL queries to retrieve data with Cache eviction in place and don't have to load the data for every transaction. Attaching sample configuration for dataregion and cache config ![image](https://github.com/user-attachments/assets/937b99ef-4900-476a-a327-8a9df6ec67b7) ![image](https://github.com/user-attachments/assets/356bdd86-939e-4d06-b193-83e31f86fd43) -- 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-unsubscr...@ignite.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
makalis commented on code in PR #11426: URL: https://github.com/apache/ignite/pull/11426#discussion_r1674349239 ## modules/opencensus/pom.xml: ## @@ -100,14 +100,12 @@ io.opencensus opencensus-exporter-stats-prometheus ${opencensus.version} -test Review Comment: Yes, changed the scope, thanks. Libs not needed for compilation, only for runtime. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22696 Added libs to opensensus to expose prometheus metrics [ignite]
nva commented on code in PR #11426: URL: https://github.com/apache/ignite/pull/11426#discussion_r1674320910 ## modules/opencensus/pom.xml: ## @@ -100,14 +100,12 @@ io.opencensus opencensus-exporter-stats-prometheus ${opencensus.version} -test Review Comment: Can we use the runtime scope for exporters like zipkin, prometheus? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] Bump org.assertj:assertj-core from 3.26.0 to 3.26.3 [ignite-3]
dependabot[bot] opened a new pull request, #4076: URL: https://github.com/apache/ignite-3/pull/4076 Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.0 to 3.26.3. Release notes Sourced from https://github.com/assertj/assertj/releases;>org.assertj:assertj-core's releases. v3.26.3 :jigsaw: Binary Compatibility The release is: Binary compatible with the previous minor version. Binary incompatible with the previous patch version. :boom: Breaking Changes Core Replace assertThat(Temporal) with assertThatTemporal(Temporal) https://redirect.github.com/assertj/assertj/issues/3519;>#3519 :bug: Bug Fixes Core Fix Javadoc rendering on FactoryBasedNavigableListAssert::assertThat Allow ComparingNormalizedFields instances to be reused across different assertions https://redirect.github.com/assertj/assertj/issues/3493;>#3493 :hammer: Dependency Upgrades Core Upgrade to Byte Buddy 1.14.18 https://redirect.github.com/assertj/assertj/issues/3531;>#3531 Upgrade to JUnit BOM 5.10.3 https://redirect.github.com/assertj/assertj/issues/3525;>#3525 Guava Upgrade to Guava 33.2.1-jre https://redirect.github.com/assertj/assertj/issues/3499;>#3499 :heart: Contributors Thanks to all the contributors who worked on this release: https://github.com/genuss;>@genuss Commits https://github.com/assertj/assertj/commit/8e97f90d62782a5fe2e49f739164361ecb54738b;>8e97f90 [maven-release-plugin] prepare release assertj-build-3.26.3 https://github.com/assertj/assertj/commit/d1afefca4e99fe6476e04d61d670fe24c25b7f4d;>d1afefc chore(deps): bump com.github.spotbugs:spotbugs-maven-plugin from 4.8.6.1 to 4... https://github.com/assertj/assertj/commit/2dc2cbfa4070d2bbeb1a748c0833c277047fd93d;>2dc2cbf chore(deps): bump byte-buddy.version from 1.14.17 to 1.14.18 (https://redirect.github.com/assertj/assertj/issues/3531;>#3531) https://github.com/assertj/assertj/commit/2541d3c1722a923c9a1cf3b33255e3fc8ee07135;>2541d3c chore(deps-dev): bump com.fasterxml.jackson.core:jackson-databind from 2.17.1... https://github.com/assertj/assertj/commit/cdb906fb0d9ee0dfddb2925f15a46a5b7b16c5da;>cdb906f [maven-release-plugin] prepare for next development iteration https://github.com/assertj/assertj/commit/c3b1f4a5eef1284e484e43374e9d5ba8ba33707d;>c3b1f4a [maven-release-plugin] prepare release assertj-build-3.26.2 https://github.com/assertj/assertj/commit/d5b52abe63cca2b84b6abc38dd9b15a0e63f9b9d;>d5b52ab [maven-release-plugin] prepare for next development iteration https://github.com/assertj/assertj/commit/17ea711f63eea0c3081be2e36f1d089edaba1f07;>17ea711 [maven-release-plugin] prepare release assertj-build-3.26.1 https://github.com/assertj/assertj/commit/8cf054db3230522155c5b637e332e485622c8b82;>8cf054d chore(deps): bump org.codehaus.mojo:versions-maven-plugin from 2.16.2 to 2.17... https://github.com/assertj/assertj/commit/5e708b48ef69f4d8c35ec86690ba6bc491cb579a;>5e708b4 chore(deps-dev): bump org.apache.groovy:groovy from 4.0.21 to 4.0.22 (https://redirect.github.com/assertj/assertj/issues/3527;>#3527) Additional commits viewable in https://github.com/assertj/assertj/compare/assertj-build-3.26.0...assertj-build-3.26.3;>compare view [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=org.assertj:assertj-core=gradle=3.26.0=3.26.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close
Re: [PR] IGNITE-22353 Basic Python DB API Driver [ignite-3]
arcolight commented on code in PR #4075: URL: https://github.com/apache/ignite-3/pull/4075#discussion_r1674244144 ## modules/platforms/python/cpp_module/py_connection.cpp: ## @@ -0,0 +1,109 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +#include + +#include "module.h" +#include "py_connection.h" + +#include + +int py_connection_init(py_connection *self, PyObject *args, PyObject *kwds) +{ +UNUSED_VALUE args; +UNUSED_VALUE kwds; + +self->m_env = nullptr; +self->m_conn = nullptr; + +return 0; +} + +void py_connection_dealloc(py_connection *self) +{ +delete self->m_conn; +delete self->m_env; + +self->m_conn = nullptr; +self->m_env = nullptr; + +Py_TYPE(self)->tp_free(self); +} + +static PyObject* py_connection_close(py_connection* self, PyObject*) +{ +if (self->m_conn) { +self->m_conn->release(); +if (!check_errors(*self->m_conn)) +return nullptr; Review Comment: Should we delete `self->m_env` in this case? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22684 Update Ignite dependency json-path [ignite]
alex-plekhanov merged PR #11431: URL: https://github.com/apache/ignite/pull/11431 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22669 Change maven.compiler.source to 11 [ignite]
timoninmaxim opened a new pull request, #11432: URL: https://github.com/apache/ignite/pull/11432 Thank you for submitting the pull request to the Apache Ignite. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### The Contribution Checklist - [ ] 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 pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE- Change summary` where `` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html)) ### Notes - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute) - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules) - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines) - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot) If you need any help, please email d...@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22671 Fix ducktape dns_failure test under JDK11 [ignite]
timoninmaxim merged PR #11429: URL: https://github.com/apache/ignite/pull/11429 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22707 Fix node failure when runtime exception occurs on snapsh… [ignite]
alex-plekhanov merged PR #11430: URL: https://github.com/apache/ignite/pull/11430 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22353 Basic Python DB API Driver [ignite-3]
isapego opened a new pull request, #4075: URL: https://github.com/apache/ignite-3/pull/4075 https://issues.apache.org/jira/browse/IGNITE-22353 Implemented: - Basic project layout; - Tests stub; - Integration with C++ project; - Connection to a cluster (re-used ODBC code); -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] Bump org.junit.platform:junit-platform-testkit from 1.10.2 to 1.10.3 [ignite-3]
ptupitsyn merged PR #4004: URL: https://github.com/apache/ignite-3/pull/4004 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22523 Thin client: reserve op code range for extensions [ignite-3]
ptupitsyn merged PR #4071: URL: https://github.com/apache/ignite-3/pull/4071 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22708 Do not start distributionZoneRebalanceEngineV2 without f… [ignite-3]
sanpwc opened a new pull request, #4074: URL: https://github.com/apache/ignite-3/pull/4074 …eature flag. 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22713: Sql. Move timeout scheduling code to ExecutionContext [ignite-3]
lowka commented on code in PR #4073: URL: https://github.com/apache/ignite-3/pull/4073#discussion_r1674067672 ## modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImplTest.java: ## @@ -206,13 +210,17 @@ public class ExecutionServiceImplTest extends BaseIgniteAbstractTest { @BeforeEach public void init() { +HybridClock clock = new HybridClockImpl(); Review Comment: Removed it. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [I] Entry processor gets invoked twice even with backups=0 and atomicityMode=ATOMIC [ignite]
ptupitsyn commented on issue #11416: URL: https://github.com/apache/ignite/issues/11416#issuecomment-829598 Discussed on the user list: https://lists.apache.org/thread/xbcnk17jrhvt278ps9mqo44n6z5jl24w Please avoid asking the same question in multiple channels. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22317 Revert unrelated changes, fix compilation on java 8 [ignite-extensions]
asfgit closed pull request #280: IGNITE-22317 Revert unrelated changes, fix compilation on java 8 URL: https://github.com/apache/ignite-extensions/pull/280 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22684 Update Ignite dependency json-path [ignite]
nao-it opened a new pull request, #11431: URL: https://github.com/apache/ignite/pull/11431 Thank you for submitting the pull request to the Apache Ignite. In order to streamline the review of the contribution we ask you to ensure the following steps have been taken: ### The Contribution Checklist - [ ] 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 pull request body describes changes that have been made. The description explains _WHAT_ and _WHY_ was made instead of _HOW_. - [ ] The pull request title is treated as the final commit message. The following pattern must be used: `IGNITE- Change summary` where `` - number of JIRA issue. - [ ] A reviewer has been mentioned through the JIRA comments (see [the Maintainers list](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute#HowtoContribute-ReviewProcessandMaintainers)) - [ ] The pull request has been checked by the Teamcity Bot and the `green visa` attached to the JIRA ticket (see [TC.Bot: Check PR](https://mtcga.gridgain.com/prs.html)) ### Notes - [How to Contribute](https://cwiki.apache.org/confluence/display/IGNITE/How+to+Contribute) - [Coding abbreviation rules](https://cwiki.apache.org/confluence/display/IGNITE/Abbreviation+Rules) - [Coding Guidelines](https://cwiki.apache.org/confluence/display/IGNITE/Coding+Guidelines) - [Apache Ignite Teamcity Bot](https://cwiki.apache.org/confluence/display/IGNITE/Apache+Ignite+Teamcity+Bot) If you need any help, please email d...@ignite.apache.org or ask anу advice on http://asf.slack.com _#ignite_ channel. -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22713: Sql. Move timeout scheduling code to ExecutionContext [ignite-3]
ygerzhedovich commented on code in PR #4073: URL: https://github.com/apache/ignite-3/pull/4073#discussion_r1673921032 ## modules/sql-engine/src/test/java/org/apache/ignite/internal/sql/engine/exec/ExecutionServiceImplTest.java: ## @@ -206,13 +210,17 @@ public class ExecutionServiceImplTest extends BaseIgniteAbstractTest { @BeforeEach public void init() { +HybridClock clock = new HybridClockImpl(); Review Comment: What reason to add the line? -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22713: Sql. Move timeout scheduling code to ExecutionContext [ignite-3]
lowka opened a new pull request, #4073: URL: https://github.com/apache/ignite-3/pull/4073 - Moves timeout scheduling code to `ExecutionContext::scheduleTimeout` - Reduces code duplication in `ExecutionServiceTest` https://issues.apache.org/jira/browse/IGNITE-22713 --- 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22709 Use IndexMeta in ChangeIndexStatusTask [ignite-3]
tkalkirill opened a new pull request, #4072: URL: https://github.com/apache/ignite-3/pull/4072 https://issues.apache.org/jira/browse/IGNITE-22709 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- Change summary where - 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[PR] IGNITE-22523 Thin client: reserve op code range for extensions [ignite-3]
ptupitsyn opened a new pull request, #4071: URL: https://github.com/apache/ignite-3/pull/4071 https://issues.apache.org/jira/browse/IGNITE-22523 -- 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-unsubscr...@ignite.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
Re: [PR] IGNITE-22636 Implement catalog compaction coordinator [ignite-3]
xtern commented on code in PR #4059: URL: https://github.com/apache/ignite-3/pull/4059#discussion_r1673805591 ## modules/catalog/src/main/java/org/apache/ignite/internal/catalog/CatalogCompactionRunner.java: ## @@ -0,0 +1,297 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.ignite.internal.catalog; + +import static java.util.function.Predicate.not; +import static org.apache.ignite.internal.util.IgniteUtils.inBusyLock; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.concurrent.CompletableFuture; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.Executor; +import java.util.concurrent.atomic.AtomicLong; +import java.util.stream.Collectors; +import org.apache.ignite.internal.affinity.Assignment; +import org.apache.ignite.internal.affinity.TokenizedAssignments; +import org.apache.ignite.internal.catalog.descriptors.CatalogTableDescriptor; +import org.apache.ignite.internal.catalog.descriptors.CatalogZoneDescriptor; +import org.apache.ignite.internal.catalog.message.CatalogMessageGroup; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeRequest; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeRequestImpl; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeResponse; +import org.apache.ignite.internal.catalog.message.CatalogMinimumRequiredTimeResponseImpl; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalNode; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologyService; +import org.apache.ignite.internal.cluster.management.topology.api.LogicalTopologySnapshot; +import org.apache.ignite.internal.hlc.ClockService; +import org.apache.ignite.internal.hlc.HybridTimestamp; +import org.apache.ignite.internal.logger.IgniteLogger; +import org.apache.ignite.internal.logger.Loggers; +import org.apache.ignite.internal.manager.ComponentContext; +import org.apache.ignite.internal.manager.IgniteComponent; +import org.apache.ignite.internal.network.ClusterNodeImpl; +import org.apache.ignite.internal.network.MessagingService; +import org.apache.ignite.internal.network.NetworkMessage; +import org.apache.ignite.internal.network.TopologyService; +import org.apache.ignite.internal.placementdriver.PlacementDriver; +import org.apache.ignite.internal.replicator.ReplicationGroupId; +import org.apache.ignite.internal.replicator.TablePartitionId; +import org.apache.ignite.internal.util.CompletableFutures; +import org.apache.ignite.internal.util.IgniteSpinBusyLock; +import org.jetbrains.annotations.Nullable; +import org.jetbrains.annotations.TestOnly; + +/** + * Catalog compaction runner. + * + * The main goal of this runner is to determine the minimum required catalog version for the cluster + * and the moment when the catalog history up to this version can be safely deleted. + * + * Overall process consists of the following steps: + * + * Routine is triggered after receiving local notification that the low watermark + * has been updated on catalog compaction coordinator (metastorage group leader). + * Coordinator calculates the minimum required time in the cluster + * by sending {@link CatalogMinimumRequiredTimeRequest} to all cluster members. + * If it is considered safe to trim the history up to calculated catalog version + * (at least, all partition owners are present in the logical topology), then the catalog is compacted. + * + */ +public class CatalogCompactionRunner implements IgniteComponent { +private static final IgniteLogger LOG = Loggers.forClass(CatalogCompactionRunner.class); + +private static final long ANSWER_TIMEOUT = 5_000; + +private final CatalogManagerImpl catalogManager; + +private final MessagingService messagingService; + +private final TopologyService topologyService; + +private final LogicalTopologyService logicalTopologyService; + +private final PlacementDriver placementDriver; + +private final ClockService clockService; + +private final Executor executor; + +private final IgniteSpinBusyLock