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

Akka.Actor: IStash API and configuration enhancements #6660

Merged
merged 4 commits into from
Apr 24, 2023

Conversation

Aaronontheweb
Copy link
Member

@Aaronontheweb Aaronontheweb commented Apr 21, 2023

Changes

close #6658 - expose data about the contents of the stash and make it easier to configure bounded stashes.

Checklist

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

@Aaronontheweb
Copy link
Member Author

Have the data APIs and use cases ready to go, as those were pretty easy. Working on the deployment / configuration pieces now.

Copy link
Member Author

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

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

Detailed my changes

@@ -1134,6 +1134,11 @@ namespace Akka.Actor
}
public interface IStash
{
int Capacity { get; }
Copy link
Member Author

Choose a reason for hiding this comment

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

New stashing APIs. Pretty self-explanatory.

@@ -695,6 +695,12 @@ public void Prepend(IEnumerable<Envelope> envelopes)
{
_userStash.Prepend(envelopes);
}

public int Count => _userStash.Count;
Copy link
Member Author

Choose a reason for hiding this comment

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

For the Eventsourced stash, we use the values provided for the user stash rather than the internal one (since the user can't really affect the internal stash anyway.)

}

[Fact]
public async Task ShouldGetAccurateStashReadingForUnboundedStash()
Copy link
Member Author

Choose a reason for hiding this comment

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

Basic happy path stash spec. Going to add one for dealing with bounded stashes once I get the other half of #6658

@Aaronontheweb Aaronontheweb marked this pull request as ready for review April 21, 2023 22:05
@Aaronontheweb
Copy link
Member Author

I'll document the new config API in a separate PR.

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

@Aaronontheweb Aaronontheweb merged commit 8b6c0ff into akkadotnet:dev Apr 24, 2023
@Aaronontheweb Aaronontheweb deleted the fix-6558-stash-size-APIs branch April 24, 2023 12:34
@Aaronontheweb Aaronontheweb added this to the 1.5.4 milestone Apr 24, 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.

Akka.Actor: IStash improvements - programmatic bounded stash configuration and stash capacity APIs
2 participants