Skip to content
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

chore: WrapSds from family_utils.h #3818

Merged
merged 3 commits into from
Oct 1, 2024
Merged

Conversation

dranikpg
Copy link
Contributor

Remove some of the c'stlye code

src/server/stream_family.cc Show resolved Hide resolved
if (blocking_controller) {
blocking_controller->AwakeWatched(op_args.db_cntx.db_index, key);
}
raxRemove(cgr_res->s->cgroups, (uint8_t*)(gname.data()), gname.size(), NULL);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Check cg?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ping here? Did you validate that based on the code cgr_res->cg is always defined here?
Please add DCHECK before raxRemove

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah I see now why, nm

src/server/stream_family.cc Show resolved Hide resolved
@dranikpg dranikpg marked this pull request as ready for review October 1, 2024 10:53
@dranikpg dranikpg requested review from romange and kostasrim October 1, 2024 10:53
consumer = streamCreateConsumer(cgr_res->cg, op_args.shard->tmp_str1, nullptr, 0,
SCC_NO_NOTIFY | SCC_NO_DIRTIFY);
auto cname = WrapSds(opts.consumer);
if ((consumer = streamLookupConsumer(cgr_res->cg, cname, SLC_NO_REFRESH)) == nullptr) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: i personally do not like these double level expressions.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not me who introduced it ☝🏻

romange
romange previously approved these changes Oct 1, 2024
Copy link
Collaborator

@romange romange left a comment

Choose a reason for hiding this comment

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

👏🏼 👏🏼 👏🏼 Very Nice!

Co-authored-by: Kostas Kyrimis  <[email protected]>
Signed-off-by: Roman Gershman <[email protected]>
@romange romange merged commit beb2ec2 into dragonflydb:main Oct 1, 2024
9 checks passed
@dranikpg dranikpg deleted the family-utils branch October 20, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants