anton-vinogradov commented on code in PR #13095:
URL: https://github.com/apache/ignite/pull/13095#discussion_r3579550865
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java:
##########
@@ -201,26 +191,8 @@ public int marshalledSize(CacheObjectContext ctx) throws
IgniteCheckedException
return SIZE_OVERHEAD + size;
}
- /**
- * @param ctx Cache context.
- * @throws IgniteCheckedException In case of error.
- */
- public void marshal(GridCacheContext ctx) throws IgniteCheckedException {
- marshal(ctx.cacheObjectContext());
- }
-
- /**
- * @param ctx Cache context.
- * @throws IgniteCheckedException In case of error.
- */
- public void marshal(CacheObjectContext ctx) throws IgniteCheckedException {
- assert key != null;
-
- key.prepareMarshal(ctx);
-
- if (val != null)
- val.prepareMarshal(ctx);
-
+ /** {@inheritDoc} */
+ @Override public void marshal(Marshaller marsh) throws
IgniteCheckedException {
Review Comment:
The hook family is "a custom wire-preparation step ordered around the
generated (de)serialization", not necessarily a `Marshaller` call (several
master `prepareMarshal` impls ignored their context too). `expireTime` must
become a relative duration exactly once right before the send and turn back
right after the receive — precisely the marshal/unmarshal lifecycle points; the
conversion is deliberately non-idempotent and pinned by
`MessageMarshalOnceTest` (a second conversion instantly expires entries — the
retry regression from the first review round). Renaming the hooks to match such
semantics is the same topic as in the `GridDhtPartitionsFullMessage` thread — a
separate PR.
##########
modules/core/src/main/java/org/apache/ignite/internal/processors/cache/GridCacheEntryInfo.java:
##########
@@ -231,30 +203,8 @@ public void marshal(CacheObjectContext ctx) throws
IgniteCheckedException {
}
}
- /**
- * Unmarshalls entry.
- *
- * @param ctx Cache context.
- * @param clsLdr Class loader.
- * @throws IgniteCheckedException If unmarshalling failed.
- */
- public void unmarshal(GridCacheContext ctx, ClassLoader clsLdr) throws
IgniteCheckedException {
- unmarshal(ctx.cacheObjectContext(), clsLdr);
- }
-
- /**
- * Unmarshalls entry.
- *
- * @param ctx Cache context.
- * @param clsLdr Class loader.
- * @throws IgniteCheckedException If unmarshalling failed.
- */
- public void unmarshal(CacheObjectContext ctx, ClassLoader clsLdr) throws
IgniteCheckedException {
- key.finishUnmarshal(ctx, clsLdr);
-
- if (val != null)
- val.finishUnmarshal(ctx, clsLdr);
-
+ /** {@inheritDoc} */
+ @Override public void unmarshal(Marshaller marsh, ClassLoader clsLdr)
throws IgniteCheckedException {
Review Comment:
Same — see above.
--
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]