-
-
Notifications
You must be signed in to change notification settings - Fork 95
Block requests to partially initialized partitions #1804
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
The fields name and id in the `passive_partition_state` used to be filled in the unpack method that does a delayed initialization after requesting the on disk data from the filesystem actor. If any request hits the `passive_partition` before it receives its flatbuffer chunk these values held incorret data, which lead to wrong or misleading information in the log messages. Since the partition id is available in the spawn function we can simply use it to initialize those parts right away to avoid the problem described above.
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.
If the segfault caused dereferencing an invalid point of self->state.partition_chunk
, then I get the fix.
I don't know how to trigger/test this locally, so leaving that part to @lava.
db0e7ef
to
7834899
Compare
This adds a check to ensure that partitions that didn't receive the chunk with their state from the filesystem actor don't try to execute commands that require that state yet.
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.
Code looks good; I also ran it locally and it seemed to work.
📔 Description
This PR fixes a segfault that occurs when a partition gets status or erase messages before it is fully initialized.
📝 Checklist
🎯 Review Instructions
Review commit-by-commit. Test locallly.