-
Notifications
You must be signed in to change notification settings - Fork 233
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
IntegrationTest: Let RandomKill and SyncChurn run in sequence #4588
Conversation
a001c84
to
439ed15
Compare
Signed-off-by: Eval EXEC <[email protected]>
439ed15
to
b3553e7
Compare
while worker_running > 0 { | ||
if max_time > 0 && start_time.elapsed().as_secs() > max_time { | ||
// shutdown, specs running to long | ||
workers.shutdown(); | ||
break; | ||
} | ||
|
||
if worker_running == 1 && !started_sequential { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems the last spec job may still have overlapping with the sequential spec job, suppose the msg
is Notify::Start
, means last job is starting executing, and we start workers.start_sequencial()
, one sequential job will start, so there is a overlapping.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a check && msg != Notify::Start
?
means the last job has just finished.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems the last spec job may still have overlapping with the sequential spec job, suppose the
msg
isNotify::Start
, means last job is starting executing, and we startworkers.start_sequencial()
, one sequential job will start, so there is a overlapping.
workers.start_sequencial()
will only be executed once.
After executing workers.start_sequencial()
, the started_sequential
variable will be true
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it will be executed once, I mean when worker_running == 1 && !started_sequential
is true, msg maybe Notify::Start
, the last spec job is starting to run, not mean the last job has just finished, if we start sequential job at this time, there maybe a overlapping with last job?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems it's ok, workers.start_sequencial()
only set a flag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When worker_running == 1
, only one worker (the sequential worker) should be running, and all other parallel workers should have exited.
msg
could beNotify::Start
If msg
is Notify::Start
, the sequential worker might be executing self.run_spec(spec.as_ref(), 0);
at that moment.
A worker can execute only one spec at a time.
Therefore, there is no chance of overlap.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the last running worker must be the sequencial_worker
...
What problem does this PR solve?
Related changes
Check List
Tests
Side effects
Release note