Persistence cache dump export, reading, validation and cleanup
This page is a public product-spec reconstruction from Apache Ignite 2 test sources at revision 486a6367610c4c891b729e89373695ef83165345.
Cache-dump tests describe the operator-visible contract for creating, reading, validating, filtering, throttling, encrypting, and cleaning dump artifacts.
User-facing guarantees
- Cache dumps are readable exports of cache data and metadata through DumpReader.
- Dump creation supports filters, compression/raw forms, custom locations, config-only mode, encrypted preconditions, and concurrent-mutation cuts where tested.
- Validation and failure paths report actionable corruption/missing-data/encryption/configuration diagnostics and clean incomplete artifacts.
Traceable requirements
Only negative or ambiguous test status is annotated after a test name, for example status=failed, status=flaky, status=ignored, or status=mixed.
DUMP-READ-EXPORT-01 — dumps are readable cache-data and metadata exports
Requirement: Created dumps must be readable through ordinary object, binary-object, and raw internal-object access paths and preserve selected metadata/version details.
Why: Operators and tooling need a dump artifact that can be inspected independently of live cache APIs.
Boundary: Mixed-strength evidence; not a full restore or disaster-recovery specification.
Evidence tests:
org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testCacheDumporg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testZippedCacheDumporg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpRawDataorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpRawDataAndDumpPathorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCompareRawWithCompressedCacheDumpsorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpEntryConflictVersion
DUMP-FILTER-LOCATION-01 — dump creation respects filters, copy selection and locations
Requirement: Dump creation must honor node/cache-group filters, primary-copy de-duplication, explicit/custom dump locations, custom data storage paths, lazy snapshot directory creation, and no-cache/config-only preconditions.
Why: Operators need predictable artifact placement and scope control.
Boundary: Evidence from selected topology/storage layouts and exact precondition failures.
Evidence tests:
org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testDumpWithNodeFilterCacheorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testCacheDumpWithReadGroupFilterorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testSkipCopiesorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testCacheDumpWithGroupFilterorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testOnlyConfigDumporg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpRawCustomStoragePathorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpRawCustomStoragePathAndDumpPathorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testSnapshotDirectoryCreatedLazilyorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCustomLocationorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCustomLocationWithDataCustomLocationorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpFailIfNoCachesorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testConfigOnlySnapshotThrows
DUMP-CONCURRENT-CUT-01 — dump represents a stable cut under controlled concurrent writes
Requirement: Dump creation under controlled concurrent inserts, updates, removals, EntryProcessor mutations, expiry, and restart/streamer scenarios must produce a consistent readable artifact.
Why: A dump must be usable while applications continue changing data in supported scenarios.
Boundary: Concurrent/restart evidence is weaker than direct functional assertions; tests are bounded harnesses, not exhaustive isolation proofs.
Evidence tests:
org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testConcurrentDumpCreationThrowsorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testWithConcurrentInsertsorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testWithConcurrentUpdatesorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testWithConcurrentEntryProcessororg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testWithConcurrentRemovalsorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testDumpWithExplicitExpireTimeorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testDumpWithImplicitExpireTimeorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpAfterRestartWithStreamerorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpAfterRestartWithStreamerCustomLocationorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpAfterRestartorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpAfterRestartCustomLocation
DUMP-VALIDATION-01 — validation reports missing/corrupt/divergent dump data
Requirement: Dump validation and iteration must detect missing partition files, wrong hashes, wrong CRC/corrupted payloads, and allow checking from other nodes including empty validation nodes.
Why: Operators need actionable diagnostics before trusting an offline dump.
Boundary: Weaker evidence: corruption is synthetic and some diagnostics depend on exact failure text.
Evidence tests:
org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckDumpFromOtherNode_singleNodeorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckDumpFromOtherNode_multiNodeorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckDumpFromOtherNode_singleNode_errorNoFileorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckDumpFromOtherNode_multiNode_errorNoFileorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckDumpFromOtherNode_singleNode_errorWrongHashorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckDumpFromOtherNode_multiNode_errorWrongHashorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpIteratorFaileOnWrongCrcorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckFailOnCorruptedDataorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCheckOnEmptyNode
DUMP-FAIL-CLEANUP-01 — failed or canceled dump creation fails closed
Requirement: File-create, iterator-write, listener-write, explicit cancel, and unready-dump cases must clean incomplete artifacts and keep the live cache usable.
Why: Failure should not leave misleading artifacts or harm the running cluster.
Boundary: Weaker where cancellation/event evidence is timing-sensitive or wait-result assertions are weak.
Evidence tests:
org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testDumpCancelOnFileCreateErrororg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testDumpCancelOnIteratorWriteErrororg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelfTest.testDumpCancelOnListenerWriteErrororg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testUnreadyDumpClearedorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCancelDump
DUMP-ENCRYPTION-OBS-01 — encrypted, throttled and debug-log dump modes expose operator contracts
Requirement: Encrypted dump creation/reading, dump rate limiting, and DumpReader debug logging must follow tested preconditions and expose group-name/no-group-name log detail.
Why: Operators need secure/controlled dump behavior and useful trace logs for support.
Boundary: Evidence; logging tests prove selected debug messages only.
Evidence tests:
org.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testCreateEncryptedFailorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testReadEncryptedorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpRateLimiterorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpReaderDebugLogsGroupNameorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpReaderDebugLogsNullableGroupNameorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpReaderDebugLogsNoGroupNameorg.apache.ignite.internal.processors.cache.persistence.snapshot.dump.IgniteCacheDumpSelf2Test.testDumpReaderSkipCopiesLogsGroupName
Important boundaries
- The evidence is about dump creation, reading, validation, diagnostics, and cleanup; it is not a full restore or disaster-recovery specification.
- Many failure cases are induced by synthetic filesystem corruption or injected errors, so diagnostic text is stronger than coverage of every real storage failure.
- Cancellation event evidence is weak where a wait result is not asserted.