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

bug: enhance asyncio concurrency safety per EVC #140

Open
viniarck opened this issue Dec 11, 2024 · 1 comment
Open

bug: enhance asyncio concurrency safety per EVC #140

viniarck opened this issue Dec 11, 2024 · 1 comment
Assignees
Labels
bug Something isn't working future_release Planned for the next release priority_major Major priority

Comments

@viniarck
Copy link
Member

viniarck commented Dec 11, 2024

Many of the subscribed events need better asyncio concurrency safety per EVC or per bulk of EVCs, example:

"kytos/mef_eline.deployed":

https://github.com/kytos-ng/telemetry_int/blob/master/main.py#L434
https://github.com/kytos-ng/telemetry_int/blob/master/main.py#L446

When redeploying might end up retrying some related HTTP requests, in which case the final execution of this event might end up delayed, which might or not be a problem. In certain cases if other subsequent EVC event happens it can cause major issues.

Normally, the HTTP server will be able to promptly respond, and mef_eline when generating subsequent events is also following its locks, so the chance for this to occur isn't too high, however, the application can't keep relying on these premises and asyncio locks need to be used here. Same comment for the other similar events.

@viniarck viniarck added the future_release Planned for the next release label Dec 11, 2024
@viniarck viniarck self-assigned this Dec 11, 2024
@viniarck viniarck added priority_medium Medium priority bug Something isn't working priority_major Major priority and removed priority_medium Medium priority labels Dec 11, 2024
@viniarck
Copy link
Member Author

Right now I'm prioritizing things of the all hands meeting that will take place in January.

I'll be able to fix this after that meeting. If anybody else wants to try to help that's appreciated too. The solution needs to be ready to acquire an asyncio lock for a set of EVCs or just one.

@viniarck viniarck changed the title bug/chore: enhance asyncio concurrency safety per EVC bug: enhance asyncio concurrency safety per EVC Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working future_release Planned for the next release priority_major Major priority
Projects
None yet
Development

No branches or pull requests

1 participant