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

get_accounts_by_authorizers multi-threaded support #204

Closed
heifner opened this issue May 9, 2022 · 0 comments · Fixed by #411
Closed

get_accounts_by_authorizers multi-threaded support #204

heifner opened this issue May 9, 2022 · 0 comments · Fixed by #411
Assignees
Labels
3.2 Candidate OCI OCI working this issue...
Milestone

Comments

@heifner
Copy link
Member

heifner commented May 9, 2022

/v1/chain/get_accounts_by_authorizers was designed to support multi-threaded calls. However, it was not hooked up to the http thread handling code, but instead was hooked up to the app thread handling.

http_plugin.hpp add_async_api

Change from:

        void add_async_api(const api_description& api) {
           for (const auto& call : api)
              add_handler(call.first, call.second);
        }

To:

        void add_async_api(const api_description& api) {
           for (const auto& call : api)
              add_async_handler(call.first, call.second);
        }

Most importantly is to test this change as testing before obviously would not have actually tested the multi-threaded code is actually safe from multi-threads.

get_accounts_by_authorizers is the only HTTP endpoint using add_async_api. The trace api calls use add_async_handler directly.

@heifner heifner self-assigned this Jun 17, 2022
@heifner heifner added the OCI OCI working this issue... label Jun 17, 2022
@arhag arhag added this to the Mandel 3.2.0-rc1 milestone Jul 1, 2022
@stephenpdeos stephenpdeos modified the milestones: Mandel 3.2.0-rc1, Mandel 3.2.0 Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2 Candidate OCI OCI working this issue...
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants