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

Tune the sequence of resources closure #5433

Closed
4 tasks done
Tracked by #5362
halibobo1205 opened this issue Aug 17, 2023 · 2 comments · Fixed by #5447
Closed
4 tasks done
Tracked by #5362

Tune the sequence of resources closure #5433

halibobo1205 opened this issue Aug 17, 2023 · 2 comments · Fixed by #5447
Assignees
Labels

Comments

@halibobo1205
Copy link
Contributor

halibobo1205 commented Aug 17, 2023

Rationale

Why should this feature exist?
The order of loading resources is Databases → Thread Pools -> Network -> Consensus → API, the order of releasing should be reversed, API → Consensus -> Network -> Thread Pools → Databases.

Implementation

Do you have ideas regarding the implementation of this feature?
As mentioned above.

  • The lifecycle of Databases is managed by the spring container. Tune the databases closure #5428
  • Thread Pools are initialized with beans.
  • Application. startup: Network-> Consensus -> API.
  • Application.shutdown: API → Consensus -> Network -> Thread Pools.

Are you willing to implement this feature?
Yes.

@halibobo1205 halibobo1205 changed the title Tune the sequence of resource(p2p, net, executor, gRPC, etc.) closure Tune the sequence of resources closure Aug 17, 2023
@halibobo1205 halibobo1205 self-assigned this Aug 17, 2023
@xxo1shine
Copy link
Contributor

@halibobo1205 Each module also has many threads, and these threads also need to have the correct shutdown order.

@halibobo1205
Copy link
Contributor Author

@halibobo1205 Each module also has many threads, and these threads also need to have the correct shutdown order.

@wubin01 Maybe analyze all the thread pools first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants