-
Notifications
You must be signed in to change notification settings - Fork 450
fix: increases maximum message size to int.MaxValue #1384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Fixed incorrect reporting of message size for Named and Unnamed message, not taking packing into account - Fixed OnBeforeMessageRecieved() and OnAfterMessageReceived() being called twice for messages that are deferred when received
@@ -11,11 +11,12 @@ internal struct MessageHeader | |||
/// unchanged - if new messages are added or messages are removed, MessageType assignments may be | |||
/// calculated differently. | |||
/// </summary> | |||
public byte MessageType; | |||
public uint MessageType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a required change for this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not required, no, but I thought it made sense. Making the other one larger meant it made sense to start packing the header. If the header's packed, then there's no reason to limit the number of messages to the byte range. It still ends up serialized as a byte due to packing.
private object m_Owner; | ||
private IMessageSender m_MessageSender; | ||
private bool m_Disposed; | ||
|
||
internal Type[] MessageTypes => m_ReverseTypeMap; | ||
internal MessageHandler[] MessageHandlers => m_MessageHandlers; | ||
internal int MessageHandlerCount => m_HighMessageType; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above not clear why these changes are needed.
}; | ||
var type = m_ReverseTypeMap[header.MessageType]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is the moving of this code related to the original fix?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes and no... one iteration of the fix did require this code to be moved... when I backtracked on that direction I realized the code still needed to be moved because as it is, it's dispatching profiling/metrics events twice for some messages. I can move it into a separate PR...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes lets move that into a different PR
# Conflicts: # com.unity.netcode.gameobjects/Runtime/Messaging/MessagingSystem.cs
* fix: increases maximum message size to int.MaxValue * Changelog entry * - Fixed tools tests - Fixed incorrect reporting of message size for Named and Unnamed message, not taking packing into account - Fixed OnBeforeMessageRecieved() and OnAfterMessageReceived() being called twice for messages that are deferred when received * Moved changelog entry to Unreleased * Reverted unrelated change. * Standards...
* fix: increases maximum message size to int.MaxValue * Changelog entry * - Fixed tools tests - Fixed incorrect reporting of message size for Named and Unnamed message, not taking packing into account - Fixed OnBeforeMessageRecieved() and OnAfterMessageReceived() being called twice for messages that are deferred when received * Moved changelog entry to Unreleased * Reverted unrelated change. * Standards... Co-authored-by: Jaedyn Draper <284434+ShadauxCat@users.noreply.github.com> Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>
…es#1384) * fix: increases maximum message size to int.MaxValue * Changelog entry * - Fixed tools tests - Fixed incorrect reporting of message size for Named and Unnamed message, not taking packing into account - Fixed OnBeforeMessageRecieved() and OnAfterMessageReceived() being called twice for messages that are deferred when received * Moved changelog entry to Unreleased * Reverted unrelated change. * Standards...
…es#1384) (Unity-Technologies#1462) * fix: increases maximum message size to int.MaxValue * Changelog entry * - Fixed tools tests - Fixed incorrect reporting of message size for Named and Unnamed message, not taking packing into account - Fixed OnBeforeMessageRecieved() and OnAfterMessageReceived() being called twice for messages that are deferred when received * Moved changelog entry to Unreleased * Reverted unrelated change. * Standards... Co-authored-by: Jaedyn Draper <284434+ShadauxCat@users.noreply.github.com> Co-authored-by: Unity Netcode CI <74025435+netcode-ci-service@users.noreply.github.com>
MTT-1646
Changelog
com.unity.netcode.gameobjects
Testing and Documentation