Skip to content

Conversation

@ramonsmits
Copy link
Member

@ramonsmits ramonsmits commented Sep 14, 2023

Hosted services are dependent on the document store which needs to be initialized before the hosted services are created by the hosting extensions.

During refactoring it was noticed that the created host are not properly being disposed by both commands and tests. All created hosts should now be properly be disposed as the end of its usage.

@ramonsmits ramonsmits changed the base branch from master to primary-ravendb5 September 14, 2023 11:40
@ramonsmits ramonsmits self-assigned this Sep 14, 2023
@ramonsmits ramonsmits force-pushed the lifecycle-wrap-host-run branch from 4cbc6ac to e4d2530 Compare September 14, 2023 11:56
…I��Hosted services have indirect dependencies on IDocumentStore which previously was only initialized when the hosted service wrapper for persistence lifecycle its start method was invoked by the extension host. This is too late. This change ensures lifecycle is async initialized so that during DI resolution IDocumentStore can actually be resolved.
@ramonsmits ramonsmits force-pushed the lifecycle-wrap-host-run branch from e4d2530 to 2c11601 Compare September 14, 2023 12:56
@ramonsmits ramonsmits marked this pull request as ready for review September 14, 2023 14:55
…creation into RavenDbInstaller.Install so that is can also be disposed there
Base automatically changed from primary-ravendb5 to master September 18, 2023 19:22
@ramonsmits ramonsmits changed the title Lifecycle wrap host run Lifecycle refactoring Sep 19, 2023
@ramonsmits ramonsmits changed the title Lifecycle refactoring Lifecycle refactoring and fixing of various IHost dispose issues Sep 19, 2023
@ramonsmits ramonsmits merged commit 1c84fea into master Sep 19, 2023
@ramonsmits ramonsmits deleted the lifecycle-wrap-host-run branch September 19, 2023 10:04
@ramonsmits ramonsmits added this to the 5.0.0 milestone Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants