[
https://issues.apache.org/jira/browse/IGNITE-29302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dmitry Werner updated IGNITE-29302:
-----------------------------------
Description:
{{GridIoManager.OrderedMessageContainer}} has an {{addedTime}} field that is
set in the constructor but never read. The constructor takes it as a boxed
{{{}Long{}}}, so each received ordered message boxes a
{{U.currentTimeMillis()}} value. This happens in two places:
* the {{GridCommunicationMessageSet}} constructor;
* {{{}GridCommunicationMessageSet#add(){}}}, which also reads the clock only
to fill this field.
Changes:
* Remove the {{addedTime}} field and its constructor parameter.
* Remove the {{U.currentTimeMillis()}} call in
{{GridCommunicationMessageSet#add()}} that only supplied this value.
* Keep {{{}GridCommunicationMessageSet#lastTs{}}}, because {{onTimeout()}}
uses it.
Behavior stays the same: message ordering, timeout handling and message
closures are not affected.
Compatibility: {{OrderedMessageContainer}} is a private, node-local queue
element. It is not {{{}Serializable{}}}, not a {{{}Message{}}}, and has no
{{@Order}} fields. It is never sent over the network or persisted, so rolling
upgrade and persistence are not affected. {{GridIoMessage}} and its generated
serializer are unchanged.
was:
{\{GridIoManager.OrderedMessageContainer}} has an \{{addedTime}} field that is
set in the constructor but never read. The constructor takes it as a boxed
\{{Long}}, so each received ordered message boxes a \{{U.currentTimeMillis()}}
value. This happens in two places:
* the \{{GridCommunicationMessageSet}} constructor;
* \{{GridCommunicationMessageSet#add()}}, which also reads the clock only to
fill this field.
Changes:
* Remove the \{{addedTime}} field and its constructor parameter.
* Remove the \{{U.currentTimeMillis()}} call in
\{{GridCommunicationMessageSet#add()}} that only supplied this value.
* Keep \{{GridCommunicationMessageSet#lastTs}}, because \{{onTimeout()}} uses
it.
Behavior stays the same: message ordering, timeout handling and message
closures are not affected.
Compatibility: \{{OrderedMessageContainer}} is a private, node-local queue
element. It is not \{{Serializable}}, not a \{{Message}}, and has no
\{{@Order}} fields. It is never sent over the network or persisted, so rolling
upgrade and persistence are not affected. \{{GridIoMessage}} and its generated
serializer are unchanged.
Performance: not measured. The JIT may already remove the boxing, so treat this
as a cleanup rather than a speedup.
> Remove unused addedTime field from GridIoManager.OrderedMessageContainer
> ------------------------------------------------------------------------
>
> Key: IGNITE-29302
> URL: https://issues.apache.org/jira/browse/IGNITE-29302
> Project: Ignite
> Issue Type: Task
> Reporter: Dmitry Werner
> Assignee: Dmitry Werner
> Priority: Minor
>
> {{GridIoManager.OrderedMessageContainer}} has an {{addedTime}} field that is
> set in the constructor but never read. The constructor takes it as a boxed
> {{{}Long{}}}, so each received ordered message boxes a
> {{U.currentTimeMillis()}} value. This happens in two places:
> * the {{GridCommunicationMessageSet}} constructor;
> * {{{}GridCommunicationMessageSet#add(){}}}, which also reads the clock only
> to fill this field.
> Changes:
> * Remove the {{addedTime}} field and its constructor parameter.
> * Remove the {{U.currentTimeMillis()}} call in
> {{GridCommunicationMessageSet#add()}} that only supplied this value.
> * Keep {{{}GridCommunicationMessageSet#lastTs{}}}, because {{onTimeout()}}
> uses it.
> Behavior stays the same: message ordering, timeout handling and message
> closures are not affected.
> Compatibility: {{OrderedMessageContainer}} is a private, node-local queue
> element. It is not {{{}Serializable{}}}, not a {{{}Message{}}}, and has no
> {{@Order}} fields. It is never sent over the network or persisted, so rolling
> upgrade and persistence are not affected. {{GridIoMessage}} and its generated
> serializer are unchanged.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)