Skip to content

fix: reset module ptr when unregister_module#21

Merged
thweetkomputer merged 3 commits intomasterfrom
fix-unregister-module
Mar 16, 2026
Merged

fix: reset module ptr when unregister_module#21
thweetkomputer merged 3 commits intomasterfrom
fix-unregister-module

Conversation

@thweetkomputer
Copy link
Collaborator

What problem does this PR solve?

Issue Number:

Problem Summary:

What is changed and the side effects?

Changed:

Side effects:

  • Performance effects(性能影响):

  • Breaking backward compatibility(向后兼容性):


Check List:

  • Please make sure your changes are compilable(请确保你的更改可以通过编译).
  • When providing us with a new feature, it is best to add related tests(如果你向我们增加一个新的功能, 请添加相关测试).
  • Please follow Contributor Covenant Code of Conduct.(请遵循贡献者准则).

const auto new_module_cnt = std::count_if(registered_modules_.begin(), registered_modules_.end(), [](eloq::EloqModule* module) {
return module != nullptr;
});
CHECK_EQ(static_cast<int>(new_module_cnt), registered_module_count);
Copy link
Collaborator

Choose a reason for hiding this comment

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

registered_module_count should be loaded again in the mutex protection area.

@thweetkomputer thweetkomputer merged commit 33470f2 into master Mar 16, 2026
2 of 17 checks passed
@thweetkomputer thweetkomputer deleted the fix-unregister-module branch March 16, 2026 07:10
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.

2 participants