Anton Vinogradov created IGNITE-29385:
-----------------------------------------
Summary: WAL compatibility test: do not fail on changes of
internal code
Key: IGNITE-29385
URL: https://issues.apache.org/jira/browse/IGNITE-29385
Project: Ignite
Issue Type: Sub-task
Reporter: Anton Vinogradov
The WAL compatibility test (IGNITE-29339) runs the test code of the current
version on a node of an older version X. Some of its checks fail when internal
code changes, though the WAL format stays the same.
# The test calls internal constructors and methods of the current version on
the JVM of X: {{DataEntry}} with 10 arguments, {{KeyCacheObjectImpl}},
{{CacheObjectImpl}}, {{GridCacheVersion}}, {{TxRecord}},
{{PartitionMetaStateRecord}}, {{IgniteProductVersion}},
{{CacheState.addPartitionState}}. Once master changes such a signature, the
test fails with {{NoSuchMethodError}} for every X. Create the records on X with
the sample generator where it is possible, and describe the remaining calls in
the javadoc as a limitation.
# The test compares private fields of nested classes: {{CacheState}},
{{GridCacheVersion}}, {{IgniteProductVersion}}. A refactoring of such a class
fails the test, and {{RENAMED_FIELDS}} covers renames only. Take the values
with public methods, as the test does for {{CacheObject}} and {{PageIO}}.
# {{testWalSegmentFromPreviousVersionIsReadable}} and
{{testEncryptedRecordsFromPreviousVersionAreReadable}} take the expected fields
from the record object in the memory of X, not from what X reads from its
bytes. A field that the format does not keep fails the test. Read the record
back on X, for example with {{wal().replay(ptr)}}.
# Partition states are compared by the names of the {{GridDhtPartitionState}}
constants, so a rename of a constant fails the test. Accept a renamed constant
the same way as {{RENAMED_FIELDS}} accepts a renamed field.
Done when a change of an internal constructor, a private field or a constant
name, with no change of the WAL format, does not fail the test for any X.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)