Concurrency Issue in OpenApiSchemaStore #58845
Labels
area-minimal
Includes minimal APIs, endpoint filters, parameter binding, request delegate generator etc
feature-openapi
Is there an existing issue for this?
Describe the bug
It appears that the current implementation of
OpenApiSchemaStore
does not handle concurrent requests as expected. While I thought that I resolved the issue in #57972, the problem persists under certain conditions.Observed Behavior:
When running the service in a Linux-based Docker container, the issue occurs almost every time on the first request.
However, when I test it locally on my Windows machine, I am unable to reproduce this issue. That's why I thought it's fixed.
Expected Behavior
The
OpenApiSchemaStore
should handle concurrent requests without issues.Steps To Reproduce
Scalar.AspNetCore
package./scalar/v1
in the browser (Scalar initiates two parallel requests on startup, reported here).Exceptions (if any)
Relevant log output:
.NET Version
9.0.100-rc.2.24474.11
Microsoft.AspNetCore.OpenApi
version9.0.0-rc.2.24474.3
Anything else?
Happy to help with resolving this issue!
The text was updated successfully, but these errors were encountered: