[
https://issues.apache.org/jira/browse/IGNITE-29385?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anton Vinogradov updated IGNITE-29385:
--------------------------------------
Description:
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. For example, the
serializer writes 0 instead of the update counter of
{{PartitionMetaStateRecord}}, so a record with the counter 77 in memory is read
back with 0. Read the record back on X with {{wal().read(ptr)}}.
# Keep fixed expected values for the fields that the format must keep, such as
the state and the timestamp of {{TxRecord}}. A field that the readers of X and
Y both lose fails no comparison of the two readers.
# 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, with no change of the WAL format:
* a rename of a private field of {{CacheState}}, {{GridCacheVersion}} or
{{IgniteProductVersion}} does not fail the test for any X;
* a rename of a {{GridDhtPartitionState}} constant passes with an entry in the
test;
* a change of the order of the {{GridDhtPartitionState}} constants still fails
the test, because the WAL keeps the number of the state;
* the javadoc lists the internal calls that remain on X.
was:
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.
> 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
> Priority: Major
>
> 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. For example,
> the serializer writes 0 instead of the update counter of
> {{PartitionMetaStateRecord}}, so a record with the counter 77 in memory is
> read back with 0. Read the record back on X with {{wal().read(ptr)}}.
> # Keep fixed expected values for the fields that the format must keep, such
> as the state and the timestamp of {{TxRecord}}. A field that the readers of X
> and Y both lose fails no comparison of the two readers.
> # 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, with no change of the WAL format:
> * a rename of a private field of {{CacheState}}, {{GridCacheVersion}} or
> {{IgniteProductVersion}} does not fail the test for any X;
> * a rename of a {{GridDhtPartitionState}} constant passes with an entry in
> the test;
> * a change of the order of the {{GridDhtPartitionState}} constants still
> fails the test, because the WAL keeps the number of the state;
> * the javadoc lists the internal calls that remain on X.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)