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

#6816 Akka.DistributedData.LightningDb: move durable folder creation outside of actor constructor #6983

Conversation

YariSPB
Copy link
Contributor

@YariSPB YariSPB commented Nov 5, 2023

#6816 Akka.DistributedData.LightningDb: move durable folder creation outside of actor constructor in order to preserve stack trace / provide clearer error messages
Fixes #

  • moved folder creation from durable store's constructor to a message handler in LmdbDurableStore.
  • added unit test to verify that a new folder is created as a result of a LoadAll message handling.
  • added unit test to verify that folder related error messages became clearer in logs.
  • derived unit test class LmdbDurableStoreSpec from Akka.TestKit.Xunit2.TestKit.

Checklist

For significant changes, please ensure that the following have been completed (delete if not relevant):

Latest dev Benchmarks

Include data from the relevant benchmark prior to this change here.

This PR's Benchmarks

Include data from after this change here.

public void Lmdb_logs_meaningful_error_for_invalid_dir_path()
{
// Try to create a directory with a path exceeding allowed length
string invalidName = new string('A', 247);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This test fails on Azure Pipeline because cloud's allowed directory path length exceeds 248 characters, and a folder is created, which shouldn't happen. Probably, it is better to remove this unit test completely because it relies on environment.

Copy link
Contributor

@Arkatufus Arkatufus left a comment

Choose a reason for hiding this comment

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

LGTM

@Arkatufus Arkatufus enabled auto-merge (squash) November 7, 2023 14:37
@Arkatufus Arkatufus merged commit aeec1b9 into akkadotnet:dev Nov 7, 2023
12 checks passed
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.

None yet

2 participants