Conversation
# Conflicts: # modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteSchema.java
There was a problem hiding this comment.
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
Copilot review overview
Review effort: Lite
Findings: 3
Open (16)
deleteDirectorycurrently returnsfalseeven on success becauseresis initialized tofalse… · NewdeleteDirectorycurrently returnsfalseeven on success becauseresis initialized tofalse… · NewdeleteDirectorycurrently returnsfalseeven on success becauseresis initialized tofalse… · New Typos/grammar in documentation: “pesmissins” → “permissions”, “a not snapshot” → “a non-snapshot”,… · New Typos/grammar in documentation: “pesmissins” → “permissions”, “a not snapshot” → “a non-snapshot”,… · New The loop variabledis not used when streaming data;streamer.addData(i, i)repeatedly writes… · New There are multiple grammar issues in this user-visible confirmation prompt (e.g., “Deletion in not… · New Two issues here: (1)toLowerCase()without an explicit locale can produce surprising results in… · New Two issues here: (1)toLowerCase()without an explicit locale can produce surprising results in… · New Two issues here: (1)toLowerCase()without an explicit locale can produce surprising results in… · New This method rejects other snapshot states viaIgniteCheckedException, but the new “delete in… · New “propogated” is misspelled; should be “propagated”. · New The identifier and the output text contain a typo/awkward phrasing:UNSURED_DELETION_PREFshould… · New Javadoc typos: “exeption” → “exception”, “cant” → “can’t/cannot”. · New The returned validation text has a grammar issue (“a an”) and reads awkwardly for a user-facing… · NewG.allGrids();is a no-op statement here (return value is ignored, and it has no side effects). It… · New
Resolved since last review (9)
This assigns core feature ID 1 to snapshot deletion, but the existing simulated 2.19.2 release… Request identity uses the raw path string, sonull, the default snapshots root, and an equivalent… The set is keyed by the raw path string, butdeletePhasetreats an empty path as the default… This lexical prefix check does not ensure that the path is actually belowsnapshotsRoot: values… The feature check is only performed insidedeletePhase, after this call has broadcast an… The new test cleanup comment misspells “paths”. The distributed process waits forserverNodes(topVer), not baseline nodes, anddeletePhase… The new Javadoc misspells “snapshot”. The new test cleanup comment misspells “patches”.
|
|
||
| /** */ | ||
| public String snapshotName() { | ||
| return snapshotName; |
There was a problem hiding this comment.
It`s not about arg processing, it about @Nullable annotation
| * @return {@code True}, if data is found and completely deleted; | ||
| * {@code False}, if nothing found or if data is found but might not be deleted completely. | ||
| */ | ||
| public boolean deleteLocalSnapshot(SnapshotFileTree sft, @Nullable AtomicBoolean existsFlag) { |
There was a problem hiding this comment.
I question about atomic - you reply about lambda and final )
Seems this complication cause you want return
IgniteSnapshotManager#deleteLocalSnapshot 2 states here, from return mechanism and from AtomicBoolean state, overcomplicated, change it plz
| * proceeds if snapshot already deleted. | ||
| */ | ||
| @Test | ||
| public void testConcurrentSnapshotDeleteOperation() throws Exception { |
There was a problem hiding this comment.
From java doc: "Tests that snapshot create detects concurrent deletion", but i see that it tests only already existing snap ? Seems this test is not cover conc deletion opertion, other conc tests need to be re checked too
There was a problem hiding this comment.
This test does cover concurrent snapshot creation operation which cannot start. Of course, we create cnapshot. With an unexisting snapshot the deletion doesn't start at all - the metas aren't found. There will be no cuncurrency, The opposite tests (when deletion cannot start) are in IgniteClusterSnapshotDeleteTest. For example, testSnapshotDeleteWhenCreateInProgress.
There was a problem hiding this comment.
For concurrent delete with create operations I expect the different err message here?
There was a problem hiding this comment.
The messages are different. Actually, snapshot creation a bit differs from other snp. operations. First things first, it checks snp. existence. But only on the node where the process starts. Also, there is the same isSnapshotDeleting() check in the first stage of the creation routine within its DP (initLocalSnapshotStartStage), near the other checks.
… into IGNITE-29050-Introduce-snapshot-deletion-command
|
|
||
| /** */ | ||
| @RunWith(Parameterized.class) | ||
| public class IgniteClusterSnapshotDeleteTest extends AbstractSnapshotSelfTest { |
There was a problem hiding this comment.
plz add test where you create 2 snaps in different cases, i.e. snap and snAp and check for deletion all of them?
There was a problem hiding this comment.
I realized I need a case-insensitive filesystem. I'll return to this question later.
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Request identity and absent-node calculation currently produce incorrect concurrency blocking and operator warnings.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 2
Open (6)
Resolved since last review (17)
deleteDirectorycurrently returnsfalseeven on success becauseresis initialized tofalse…deleteDirectorycurrently returnsfalseeven on success becauseresis initialized tofalse…deleteDirectorycurrently returnsfalseeven on success becauseresis initialized tofalse… The feature check is only performed insidedeletePhase, after this call has broadcast an… This method rejects other snapshot states viaIgniteCheckedException, but the new “delete in… Two issues here: (1)toLowerCase()without an explicit locale can produce surprising results in… Two issues here: (1)toLowerCase()without an explicit locale can produce surprising results in… Two issues here: (1)toLowerCase()without an explicit locale can produce surprising results in… There are multiple grammar issues in this user-visible confirmation prompt (e.g., “Deletion in not… The loop variabledis not used when streaming data;streamer.addData(i, i)repeatedly writes… Typos/grammar in documentation: “pesmissins” → “permissions”, “a not snapshot” → “a non-snapshot”,… Typos/grammar in documentation: “pesmissins” → “permissions”, “a not snapshot” → “a non-snapshot”,…G.allGrids();is a no-op statement here (return value is ignored, and it has no side effects). It… The returned validation text has a grammar issue (“a an”) and reads awkwardly for a user-facing… Javadoc typos: “exeption” → “exception”, “cant” → “can’t/cannot”. The identifier and the output text contain a typo/awkward phrasing:UNSURED_DELETION_PREFshould… “propogated” is misspelled; should be “propagated”.
|
|
||
| var curCreateRq = snpMgr.currentCreateRequest(); | ||
|
|
||
| if (curCreateRq != null && curCreateRq.snpName.equalsIgnoreCase(req.snpName)) { |
| return Objects.equals(resolvedPath, other.resolvedPath); | ||
| } | ||
|
|
||
| /** {@inheritDoc} */ | ||
| @Override public int hashCode() { | ||
| return Objects.hash(resolvedPath); |
| # Delete the snapshot "snapshot_09062021" located in the "/tmp/ignite/snapshots" folder. | ||
| control.bat --snapshot delete snapshot_09062021 --src /tmp/ignite/snapshots |
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.