8000 [Dashboard] Support multiple workers in asynchronous mode by rokatyy · Pull Request #3623 · nuclio/nuclio · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[Dashboard] Support multiple workers in asynchronous mode #3623

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

Merged
merged 4 commits into from
Apr 30, 2025

Conversation

rokatyy added 4 commits April 24, 2025 09:38
Jira - https://iguazio.atlassian.net/browse/NUC-410

The base branch is
[feature/nuc-201-phase2](https://github.com/nuclio/nuclio/tree/feature/nuc-201-phase2),
so we will merge to develop only when everything is ready.

Implements a new non-blocking pool allocator that allocates objects
using a round-robin strategy. The round-robin mechanism is driven by an
atomic index, which is incremented with each allocation. Additionally,
the shared pool logic has been refactored into an abstract base class,
`abstractPoolAllocator`.

The `BenchmarkParallelAllocation` test has also been made generic for
different allocator implementations. This allows us to pass in a
constructor and benchmark any allocator, which is valuable since the
allocator component is a critical part of overall performance.
…3614)

Adds support statistics in async mode with multiple workers + test for
it.

Also, added mock-ed eventProcessor and moved all test to use it in case
we need something to Mock.

Jira - https://iguazio.atlassian.net/browse/NUC-411
…iple workers (#3615)

* Add support for multiple workers in async mode
* Add a new test for multiple worker configuration in async mode

Jira - https://iguazio.atlassian.net/browse/NUC-412
Improves the allocation method in the non-blocking pool so that it
checks the state of the allocated object. If the object is not ready, it
will retry N times, where N is the number of objects in the allocator.

Also, replaced `Equal` with `Same` in allocator test. 
When mocks like MockEventProcessor are compared, identical internal
state can cause them to be seen as equal even if they are distinct
instances.
What needs to be verified in the tests is whether two different
instances are returned, not just objects with matching fields.
With Same, a comparison based on memory address is performed, ensuring
that true object identity is validated.
For this reason, Same (or NotSame) is preferred over Equal (or NotEqual)
when verifying allocation behavior with mocks.

Jira - https://iguazio.atlassian.net/browse/NUC-413
@TomerShor TomerShor merged commit bbf9384 into development Apr 30, 2025
34 of 35 checks passed
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.

2 participants
0