-
-
Notifications
You must be signed in to change notification settings - Fork 430
[Kaizen] Add CLI note on kaizen run on parallel, which rule collection start from 0 on different process #7045
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
Conversation
…art from 0 on different process
|
All checks have passed 🎉 @TomasVotruba it is ready for review. |
|
Or maybe disable parallel mode automatically when using |
|
that will defeat the purpose of parallel |
|
This is quite confusing behavior. Documenting would only hide the wtfs. We should find a way to pass counter between processes, so it works as described. |
|
@TomasVotruba the issue is, we can't control counter on other process while counting its own current rule + 1 on specific file, only total after process each done we that we can validate, like process A already rule X, and process B already rule Y, which already counted 1 before the worker is done. The possible solution is using cache, but I am not sure read + write implication is reliable for this. |
Here the detail:For example, with kaizen 1, with 2 workers work in parallel: Worker 1 - process file1.php, file2.php, file3.phpprocess rule A, add +1 from 0, we don't know yet if Worker 2 has processed 1 rule unless worker are done first Worker 2 - process file4.php, file5.php, file6.phpprocess rule B, add +1 from 0, we don't know yet if Worker 1 has processed 1 rule unless worker are done first when Worker 1 and Worker 2 are done, we see that both rule A and rule B applied already on different files, we can only validate on next Worker 3 and so on with even with rector-src/src/Application/ApplicationFileProcessor.php Lines 82 to 84 in 3d5ce61
|
But the current behavior is defeating the purpose of the kaizen option. So I think when using explicitly the kaizen option, it is more important to actually get the desired kaizen behavior than to keep the performance of the parallel mode. (Of course, it would be best if both worked together. But I also think that would be difficult.) |
|
@samsonasik What solution can you think of? However hacky. We'll start from there. |
|
@TomasVotruba I will try with cache |
|
I created PR: for it. |
|
This pull request has been automatically locked because it has been closed for 150 days. Please open a new PR if you want to continue the work. |
Closes rectorphp/rector#9231