Skip to content
This repository has been archived by the owner on Jun 23, 2022. It is now read-only.

fix(split): message header should not be empty struct #725

Merged
merged 1 commit into from
Jan 18, 2021

Conversation

hycdong
Copy link
Contributor

@hycdong hycdong commented Jan 12, 2021

Function copy_message_no_reply will be used during partition split when child copy parent's mutation, its header should not be an empty structure.

msg->header = {}; // initialize to empty struct
memset(static_cast<void *>(msg->header), 0, sizeof(message_header));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see the difference between the two statements. Please write a unit-test for copy_message_no_reply

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we discuss offline, if header is an empty strtuct, it will lead problem in Line195, which is msg->header->body_length = msg->buffers[1].length();.

@acelyc111 acelyc111 merged commit bd254db into XiaoMi:master Jan 18, 2021
@hycdong hycdong deleted the fix_message branch January 18, 2021 06:57
zhangyifan27 pushed a commit to zhangyifan27/rdsn that referenced this pull request Jan 25, 2021
zhangyifan27 pushed a commit to zhangyifan27/rdsn that referenced this pull request Jan 26, 2021
zhangyifan27 pushed a commit to zhangyifan27/rdsn that referenced this pull request Jan 26, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants