anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3579779718
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/StoredCacheData.java:
##########
@@ -45,21 +43,23 @@
* <p>
* All changes must be made with the respect of RU rules.
*/
-public class StoredCacheData implements Serializable, CdcCacheEvent,
MarshallableMessage {
+public class StoredCacheData implements Serializable, CdcCacheEvent, Message {
/** */
private static final long serialVersionUID = 0L;
/** Cache configuration. */
@GridToStringInclude
- private CacheConfiguration<?, ?> ccfg;
+ @Marshalled("ccfgBytes")
+ CacheConfiguration<?, ?> ccfg;
/** Serialized {@link #ccfg}. */
@Order(0)
transient byte[] ccfgBytes;
/** Query entities. */
@GridToStringInclude
- private Collection<QueryEntity> qryEntities;
+ @Marshalled("qryEntitiesBytes")
+ Collection<QueryEntity> qryEntities;
Review Comment:
Done. `qryEntitiesBytes` (JDK blob) is replaced by a wire DTO: `@Order(1)
transient Collection<QueryEntityMessage> qryEntityMsgs`, and the class became a
`MarshallableMessage` — the `marshal` hook builds the DTOs (`QueryEntityEx` →
`QueryEntityExMessage`, else `QueryEntityMessage`), `unmarshal` restores via
`toEntity()` and nulls the DTO field. `qryEntities` stays a plain field so the
JDK persistence path (`cache_data.dat`) is unaffected; `qryEntityMsgs` is
`transient`. The generated marshaller recurses into the DTO elements in the
right order, and the carriers (`ChangeGlobalStateMessage`,
`SnapshotRestoreOperationResponse`) recurse into `StoredCacheData` correctly.
`ccfg` stays a JDK blob for now — there's no DTO for `CacheConfiguration`
yet, and it dominates the class's JDK-dependence; I'd move it in a follow-up
once that DTO exists.
Verified: `testJoinWhileActivate1_WithCache_Server` (StoredCacheData over
discovery to a joining node) green with `IGNITE_MESSAGE_UNMARSHAL_ONCE_CHECK`,
plus `QueryEntityMessageSerializationTest` 2/2 for the DTO round-trip. (For the
record: the `*Failover3` flakes I saw while checking the full
`IgniteClusterActivateDeactivateTest` reproduce identically on a clean
`origin/master` baseline and don't use QueryEntity caches — unrelated to this
change.)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]