-
Notifications
You must be signed in to change notification settings - Fork 893
Enhance filtering logic for virtual and external endpoints #6290
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Miguel Company <[email protected]>
Signed-off-by: Raül <[email protected]>
Signed-off-by: Raül <[email protected]>
| // virtual - needs info and give none | ||
| // local - needs info and give info | ||
| // external - needs none and give info | ||
| // writer needs info = add writer participant in reader ack list | ||
| // writer give info = add reader participant in writer ack list | ||
|
|
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.
This info is also written below in another comment. I would delete this one
| const bool writer_needs_info = writer_is_virtual || writer_is_local; | ||
| const bool writer_gives_info = writer_is_local || (writer_is_external && reader_is_local); | ||
|
|
||
| const bool reader_needs_info = reader_is_virtual || reader_is_local; | ||
| const bool reader_gives_info = reader_is_local || (reader_is_external && writer_is_local); | ||
|
|
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.
I believe we still might be missing some cases. For example:
If a writer is local (gives and needs) and a reader is virtual (only needs) we should only allow information flow from the writer to the reader.
However, if the reader is virtual AND local (two servers connected between each other), the reader still gives info to the writer, as writer_needs_info is True because it is local and reader_gives_info is True because it is also local. Note that an endpoint can be both local and virtual, they are not exclusive.
We could do something like const bool reader_gives_info = !reader_is_virtual && (reader_is_local || (reader_is_external && writer_is_local));
Description
Contributor Checklist
versions.mdfile (if applicable).Reviewer Checklist