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

fix(rust): use the same in-memory database for the vault used in nif #7001

Closed
wants to merge 2 commits into from

Conversation

etorreborre
Copy link
Member

This PR:

  • fixes the creation of the software vault in NIF code by making sure that the in-memory database is shared by all special purpose vaults (signing, secure channels, etc...)

  • uses a random URL for the in-memory database and specify that the shared mode should be used to avoid the issue described here

@etorreborre etorreborre self-assigned this Nov 30, 2023
@etorreborre etorreborre marked this pull request as ready for review November 30, 2023 13:04
@etorreborre etorreborre requested a review from a team as a code owner November 30, 2023 13:04
@@ -89,17 +92,20 @@ fn identities_ref() -> NifResult<Arc<Identities>> {

fn load_memory_vault() -> bool {
block_future(async move {
let identity_vault = SoftwareVaultForSigning::create().await.unwrap();
let secure_channel_vault = SoftwareVaultForSecureChannels::create().await.unwrap();
let database = SqlxDatabase::in_memory("in-memory-vault").await.unwrap();
Copy link
Member

Choose a reason for hiding this comment

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

why no connection pool is created for the volatile vault?

pool settings for in-memory sqlite to avoid the DB be wiped out
@polvorin
Copy link
Member

closing it, replaced by #7003

@polvorin polvorin closed this Nov 30, 2023
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