michaelandrepearce commented on a change in pull request #3398:
URL: https://github.com/apache/activemq-artemis/pull/3398#discussion_r554269499
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
##########
@@ -86,7 +86,7 @@ public int compare(MessageReference o1, MessageReference o2) {
// Static --------------------------------------------------------
- private static final int memoryOffset = 64;
+ private static final int memoryOffset = 72;
Review comment:
Can we have some doc or something around this very magical number (its
magical without any context), how do we derive 72?
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
##########
@@ -86,7 +86,7 @@ public int compare(MessageReference o1, MessageReference o2) {
// Static --------------------------------------------------------
- private static final int memoryOffset = 64;
+ private static final int memoryOffset = 72;
Review comment:
Should it be a static constant then, where the constant is kept close to
where if something changes the constant is. And a small javadoc regarding how
it's calculated so that should something change people know how to recalc to
update it
##########
File path:
artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/MessageReferenceImpl.java
##########
@@ -86,7 +86,7 @@ public int compare(MessageReference o1, MessageReference o2) {
// Static --------------------------------------------------------
- private static final int memoryOffset = 64;
+ private static final int memoryOffset = 72;
Review comment:
Should it be a static constant then, where the constant is kept close to
where if something changes the constant is (i assume its based off some fields
overhead or somethin). And a small javadoc regarding how it's calculated so
that should something change people know how to recalc to update it
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]