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 ActorSystemExtensions.Get for the cases of having many extensions. #1458

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

DenizPiri
Copy link
Contributor

Description

In case anyone would ever have more than 10 extensions, this fixes a potential problem for that case.

Purpose

This pull request is a:

  • Bugfix (non-breaking change which fixes an issue)

@rogeralsing
Copy link
Contributor

Just woke up here so I might be missing something. but the array is resized together with the creation of the ID for any such plugin:

https://github.com/asynkron/protoactor-dotnet/blob/dev/src/Proto.Actor/Extensions/ActorSystemExtensions.cs#L42-L48

Are there cases where this is not enough?

@DenizPiri
Copy link
Contributor Author

DenizPiri commented Feb 12, 2022

That's right but that assumes that every extension will be registered. Which defies the point of Get function. In case the extension is not registered, id is increased beyond 10, but the array is not resized.

@rogeralsing rogeralsing enabled auto-merge (squash) April 29, 2023 10:10
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