Repository navigation
Conversation
# Conflicts: # modules/calcite/src/main/java/org/apache/ignite/internal/processors/query/calcite/schema/IgniteSchema.java
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical feature-ID compatibility and moderate snapshot metadata validation findings remain.
1 open issue
What changed in this PR
Adds control.sh|bat --snapshot list to enumerate snapshots, metadata, sizes, incremental parts, and external storage usage.
Changes:
- Adds snapshot-list commands, tasks, DTOs, and output formatting.
- Adds feature gating, documentation, help updates, and extensive tests.
- Updates snapshot metadata handling and test utilities.
| File | Description |
|---|---|
modules/ducktests/src/main/java/org/apache/ignite/internal/ducktest/tests/ContinuousDataLoadApplication.java |
Corrects a typo. |
modules/core/src/test/resources/org.apache.ignite.util/GridCommandHandlerClusterByClassWithSSLTest_help.output |
Updates CLI help. |
modules/core/src/test/resources/org.apache.ignite.util/GridCommandHandlerClusterByClassTest_help.output |
Updates CLI help. |
modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite9.java |
Adds snapshot-list test suite. |
modules/core/src/test/java/org/apache/ignite/internal/processors/rollingupgrade/feature/TestIgniteReleaseFeatures_2_19_4.java |
Adds release feature definitions. |
modules/core/src/test/java/org/apache/ignite/internal/processors/rollingupgrade/AbstractRollingUpgradeTest.java |
Updates release feature coverage. |
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/incremental/IncrementalSnapshotNodeFailureTest.java |
Updates snapshot manager access. |
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/incremental/AbstractIncrementalSnapshotTest.java |
Updates snapshot manager access. |
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotListTest.java |
Adds snapshot-list tests. |
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteClusterSnapshotListRollingUpgradeTest.java |
Adds rolling-upgrade tests. |
modules/core/src/test/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/AbstractSnapshotSelfTest.java |
Generalizes snapshot helpers. |
modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/feature/CoreFeatureRegistry.java |
Registers the snapshot-list feature. |
modules/core/src/main/java/org/apache/ignite/internal/processors/metastorage/persistence/DistributedMetaStorageImpl.java |
Corrects a typo. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotMetadataVerificationTask.java |
Adds TODO documentation. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotListTaskResult.java |
Adds aggregate result DTO. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotListJobResult.java |
Adds per-node result DTO. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotCheckProcess.java |
Corrects a typo. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java |
Supports tolerant metadata reads. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/filename/SnapshotFileTree.java |
Documents path limitations. |
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/distributed/dht/preloader/GridDhtPartitionsSingleMessage.java |
Corrects a typo. |
modules/core/src/main/java/org/apache/ignite/internal/management/snapshot/SnapshotListTask.java |
Implements snapshot discovery and sizing. |
modules/core/src/main/java/org/apache/ignite/internal/management/snapshot/SnapshotListCommandArg.java |
Adds the --src argument. |
modules/core/src/main/java/org/apache/ignite/internal/management/snapshot/SnapshotListCommand.java |
Formats command output. |
modules/core/src/main/java/org/apache/ignite/internal/management/snapshot/SnapshotCommand.java |
Registers the list subcommand. |
modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerListSnapshotTest.java |
Adds CLI tests. |
modules/control-utility/src/test/java/org/apache/ignite/util/GridCommandHandlerAbstractTest.java |
Refactors test cache setup. |
modules/control-utility/src/test/java/org/apache/ignite/testsuites/IgniteControlUtilityTestSuite6.java |
Adds CLI test suite. |
docs/_docs/snapshots/snapshots.adoc |
Documents snapshot listing. |
Review effort: Lite
|
|
||
| // Sorted snapshots names for better user reading. | ||
| new TreeMap<>(nodeResult.snapshots()).forEach((snpName, snpInfo) -> { | ||
| printer.accept("\t\tSnapshot '%s': totalSize=%s (%db), created='%s' (epoch=%d)".formatted( |
There was a problem hiding this comment.
Output like : Snapshot 'testSnapshot0': totalSize=659.0 KB (674843b), created='2026-10-19 09:11:00 +0300' (epoch=1792390260252)
Why do you deside that: 1. size in bytes 2. epoch is helpful somehow ? I just think it looks like a garbage, fix me if i`m wrong.
There was a problem hiding this comment.
Good question. Here's the thinking:
Exact date: tying the output to a hardcoded format isn't a good practice actually (it varies by region). Adding a config option would bloat this ticket. If anyone want othe date format, epoch time
is always available. I was actually thinking of a verbose flag that would return epoch time and the byte size.
Exact size: familiar commands across OSes give you both a friendly and an exact view. I kept it, but I'm fine dropping the byte value if the team prefers.
WDYT?
There was a problem hiding this comment.
Also seems we need table with columns format here, if it common case for control utility output
There was a problem hiding this comment.
from discussion: need to investigate common usage timporal output format, probably : dd.MM.YYYY - HH:MM
There was a problem hiding this comment.
Based on my research, the current format is close to well-known standards and common practices. Examples:
- ISO 8601: '2026-09-18T12:00:00Z' / '2026-09-18T12:00:00+03:00'
- DateTimeFormatter.ISO_INSTANT: '2024-01-15T14:30:45.123Z'
- DateTimeFormatter.ISO_OFFSET_DATE_TIME: '2024-01-15T17:30:45.123+03:00'
- Typical SQL-like timestamp: 'uuuu-MM-dd HH:mm:ss.SSS'
The main principle is that larger units (such as years or months) come before smaller ones (such as hours, minutes, and seconds). The timezone (if required) comes last.
There was a problem hiding this comment.
With the table format, the date format isn’t relevant. I believe we should discuss and choose a single common format, but not in this ticket. Here I’m sticking with the existing one.
| private void doTestWrongSnapshotPath(boolean missing) throws Exception { | ||
| // Doesn't matter here, speeds up the tests. | ||
| assumeFalse(snpThrdPoolSz < 2); |
There was a problem hiding this comment.
| private void doTestWrongSnapshotPath(boolean missing) throws Exception { | |
| // Doesn't matter here, speeds up the tests. | |
| assumeFalse(snpThrdPoolSz < 2); | |
| private void doTestWrongSnapshotPath(boolean missing) throws Exception { | |
| // Doesn't matter here, speeds up the tests. | |
| snpThrdPoolSz = DFLT_SNAPSHOT_THREAD_POOL_SIZE; | |
| assumeFalse(snpThrdPoolSz < 2); |
Seems you need to simplify tests, remove snpThrdPoolSz from params and use directly
There was a problem hiding this comment.
Why snpThrdPoolSz = DFLT_SNAPSHOT_THREAD_POOL_SIZE;? It would be configured.
There was a problem hiding this comment.
Not sure we should skip the pool size parameter. We do use the pool. I've already met stuck issues in snapshots when a user configures just one thread.
There was a problem hiding this comment.
First - you remove "assumeFalse(snpThrdPoolSz < 2);" and after you write this comment ) My - become unrelevant after your changes )
There was a problem hiding this comment.
Done. Removed everywhere except the spot that intentionally blocks a thread for testing.
…s-command-to-control.sh' into IGNITE-29056-Introduce-snapshot-lists-command-to-control.sh
…and-to-control.sh # Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/feature/CoreFeatureRegistry.java
…and-to-control.sh # Conflicts: # modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/feature/CoreFeatureRegistry.java
…and-to-control.sh-dev # Conflicts: # docs/_docs/snapshots/snapshots.adoc # modules/control-utility/src/test/java/org/apache/ignite/testsuites/IgniteControlUtilityTestSuite6.java # modules/core/src/main/java/org/apache/ignite/internal/management/snapshot/SnapshotCommand.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/IgniteSnapshotManager.java # modules/core/src/main/java/org/apache/ignite/internal/processors/cache/persistence/snapshot/SnapshotMetadataVerificationTask.java # modules/core/src/main/java/org/apache/ignite/internal/processors/rollingupgrade/feature/CoreFeatureRegistry.java # modules/core/src/test/java/org/apache/ignite/testsuites/IgniteSnapshotTestSuite9.java # modules/core/src/test/resources/org.apache.ignite.util/GridCommandHandlerClusterByClassTest_help.output # modules/core/src/test/resources/org.apache.ignite.util/GridCommandHandlerClusterByClassWithSSLTest_help.output
…l.sh-dev' into IGNITE-29056-Introduce-snapshot-lists-command-to-control.sh
…and-to-control.sh
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.