Conversation
# Conflicts: # modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteSchema.java
| if (status == null || status == res.status) | ||
| status = res.status; |
There was a problem hiding this comment.
why do u need to set status = res.status if it already can be the same ? status == res.status branch
There was a problem hiding this comment.
Done. Will push a bit later
There was a problem hiding this comment.
now it hard to understand logic : if status ==null - you set it to res.status, otherwize you set it to PARTLY despite of incoming status (
… into IGNITE-29050-Introduce-snapshot-deletion-command # Conflicts: # modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotDeleteTest.java
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Critical issues remain in deletion cleanup, metadata validation, and rolling-upgrade feature identification.
Review effort: Lite
Findings: 3
Open (9)
Preserve metadata when snapshot cleanup is incomplete · New Prevent deletion when any snapshot metadata is unreadable · New Reconcile duplicate rolling-upgrade feature ID · New Resolve relative snapshot source paths against configured snapshot directory · New Use filesystem-aware snapshot name comparison during restore · New Use filesystem-aware snapshot matching in incremental scans · New Use filesystem-aware keys for snapshot validation contexts · New Use filesystem-aware identity for creation and deletion conflicts · New Check captured permissions before restoring them · New
Resolved since last review (7)
The feature check is only performed insidedeletePhase, after this call has broadcast an… Snapshot deletion key omits snapshot name Conflict checks ignore snapshot path Correct wording after “has completely” Fix typo in “snapshot” Refer to filesystem paths, not patches Use a Windows path in the Windows example
| U.delete(sft.binaryMeta()); | ||
| sft.allStorages().forEach(U::delete); | ||
| U.delete(sft.meta()); | ||
| if (!sft.meta().delete() && sft.meta().exists()) |
|
|
||
| // We need to find and read snapshot metas to ensure the content is a snapshot. Also, the metas contain | ||
| // initial cluster topology and actual snapshot folder names. | ||
| List<SnapshotMetadata> locMetas = kctx.cache().context().snapshotMgr().readSnapshotMetadatas(snpFiles, false); |
There was a problem hiding this comment.
This seems not so critical. On separated nodes, with own working directory, there is one snapshot. In the shared snapshot folder, we'll try to remove entire if just one meta is read. It is ok to me.
| public static final IgniteFeature ROLLING_UPGRADE_FEATURE = new IgniteCoreFeature(0); | ||
|
|
||
| /** */ | ||
| public static final IgniteFeature SNAPSHOT_DELETE_FEATURE = new IgniteCoreFeature(1); |
There was a problem hiding this comment.
This is relative test sets. I think isn't critical it all the related tests passes.
| @Argument(example = "path/to/snapshots", optional = true, description = "Path to snapshot location directory. If not specified " + | ||
| "or specified a relative path, the default snapshot configuration directory will be used") |
| if (snpName == null) | ||
| return false; | ||
|
|
||
| return snpName.equalsIgnoreCase(restoreCacheGrpProc.restoringSnapshotName()); |
There was a problem hiding this comment.
We know. Many snapshot operations doesn't support case insensitivity. This is current limitation. We have tests for such cases. Bringing filesystem-aware/path-aware comparison everywhere is out of scope of this ticket.
|
|
||
| if (rec.type() == CLUSTER_SNAPSHOT && ((ClusterSnapshotRecord)rec).clusterSnapshotName().equals(sft.name())) { | ||
| // A filesystem might not support the character case of directory or file name. | ||
| if (rec.type() == CLUSTER_SNAPSHOT && ((ClusterSnapshotRecord)rec).clusterSnapshotName().equalsIgnoreCase(sft.name())) { |
There was a problem hiding this comment.
We know. Many snapshot operations doesn't support case insensitivity. This is current limitation. We have tests for such cases. Bringing filesystem-aware/path-aware comparison everywhere is out of scope of this ticket.
| return new GridFinishedFuture<>(new NodeStoppingException("The node is stopping: " + kctx.localNodeId())); | ||
|
|
||
| ctx = contexts.computeIfAbsent(req.snapshotName(), snpName -> new SnapshotCheckContext(req)); | ||
| ctx = contexts.computeIfAbsent(req.snapshotName().toLowerCase(Locale.ROOT), snpName -> new SnapshotCheckContext(req)); |
There was a problem hiding this comment.
We know. Many snapshot operations doesn't support case insensitivity. This is current limitation. We have tests for such cases. Bringing filesystem-aware/path-aware comparison everywhere is out of scope of this ticket.
|
|
||
| SnapshotOperationRequest curCreateRq = snpMgr.currentCreateRequest(); | ||
|
|
||
| if (curCreateRq != null && curCreateRq.snpName.equalsIgnoreCase(req.snpName)) { |
There was a problem hiding this comment.
We know. Many snapshot operations doesn't support case insensitivity. This is current limitation. We have tests for such cases. Bringing filesystem-aware/path-aware comparison everywhere is out of scope of this ticket.
| if (pathRef.get() != null && pathRef.get() != null) | ||
| Files.setPosixFilePermissions(pathRef.get(), prevPerms.get()); |
… into IGNITE-29050-Introduce-snapshot-deletion-command # Conflicts: # modules/core/src/test/resources/org.apache.ignite.util/GridCommandHandlerClusterByClassWithSSLTest_help.output
…ommand # Conflicts: # modules/core/src/test/java/org/apache/ignite/internal/processors/rollingupgrade/feature/TestIgniteReleaseFeatures_2_19_1.java
… into IGNITE-29050-Introduce-snapshot-deletion-command # Conflicts: # modules/core/src/test/java/org/apache/ignite/internal/processors/rollingupgrade/feature/TestIgniteReleaseFeatures_2_19_1.java
Possible compatibility issues. Please, check rolling upgrade casesThis PR modifies protected classes (with Order annotation). Affected files:
|



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
The description explains WHAT and WHY was made instead of HOW.
The following pattern must be used:
IGNITE-XXXX Change summarywhereXXXX- number of JIRA issue.(see the Maintainers list)
the
green visaattached to the JIRA ticket (see tabPR Checkat TC.Bot - Instance 1 or TC.Bot - Instance 2)Notes
If you need any help, please email dev@ignite.apache.org or ask anу advice on http://asf.slack.com #ignite channel.