mw/com: Various field fixes#735
Open
bemerybmw wants to merge 5 commits into
Open
Conversation
bemerybmw
force-pushed
the
brem_field_setter_return_result
branch
from
July 21, 2026 11:27
70b9f5b to
7bce8fa
Compare
bemerybmw
marked this pull request as ready for review
July 21, 2026 12:17
bemerybmw
requested review from
LittleHuba,
castler,
crimson11,
hoe-jo and
limdor
as code owners
July 21, 2026 12:17
bemerybmw
commented
Jul 21, 2026
bemerybmw
marked this pull request as draft
July 21, 2026 13:16
bemerybmw
force-pushed
the
brem_field_setter_return_result
branch
from
July 22, 2026 14:01
7bce8fa to
be1c52d
Compare
Since a set handler will call Send on the owned event, it will require allocating an event slot. We don't want to support multiple concurrent calls to setters since we don't see a reasonable use case for this and it would consume additional resources by requiring us to increase the size of the slot vector. Therefore, we add a mutex to ensure that only one set handler can be called at any one time. Another commit will handle increasing the slot vector size when a setter in enabled.
bemerybmw
force-pushed
the
brem_field_setter_return_result
branch
from
July 22, 2026 14:05
be1c52d to
aba3c59
Compare
bemerybmw
marked this pull request as ready for review
July 22, 2026 14:38
bemerybmw
marked this pull request as draft
July 22, 2026 14:56
castler
requested changes
Jul 23, 2026
| ) | ||
|
|
||
| cc_library( | ||
| name = "shm_compatible_result", |
Contributor
There was a problem hiding this comment.
I would strongly vote that we do not reimplement score::Result, your statement that we cannot control it is IMHO not true. If we see it like that - then we can also not control std::vector, or map or...Thus, let's use it IMHO and IF at some point in time we would get a problem (which cannot be because it would require dynamic memory allocation on all hot paths) then we can still reimplement it.
Since we check that the pointer is not a nullptr in the function, we can return a reference so that the caller doesn't have to consider the nullptr case.
We currently have a race condition between the provider thread moving a skeleton and a consumer thread calling a setter which accesses the field which is being moved (SWP-273945). To fix this issue, we access the event directly which is stored as a unique_ptr so will never be moved.
bemerybmw
force-pushed
the
brem_field_setter_return_result
branch
from
July 23, 2026 06:50
aba3c59 to
b56ac35
Compare
Since the setter / getter functions can fail within the middleware code (e.g. when trying to update the field value fails), we need to return a result from the setter and getter.
bemerybmw
force-pushed
the
brem_field_setter_return_result
branch
from
July 23, 2026 07:22
b56ac35 to
e93d55e
Compare
bemerybmw
marked this pull request as ready for review
July 23, 2026 11:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.