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

Remove for await loops on distributed jobs #4766

Open
elreplicante opened this issue Jun 21, 2022 · 1 comment
Open

Remove for await loops on distributed jobs #4766

elreplicante opened this issue Jun 21, 2022 · 1 comment

Comments

@elreplicante
Copy link
Contributor

elreplicante commented Jun 21, 2022

for await loops are intended to be used on async iterators/generators. During the development of the sync feature as a distributed loop, we noticed that the behaviour of this loops is not strictly sequential, which can lead to unexpected effects on the implementation.

As we used that approach moving the TOC job to a distributed loop, we think moving back to a reduce loop approach is the way to implement asynchronous calls inside loops.

@LaszloKecskes
Copy link
Contributor

How about a plain old loop (for generators, maybe one of the whiles)? If I remember correctly, we have talked about ignoring the "no await in loop" rule in specific cases where it is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants