-
Notifications
You must be signed in to change notification settings - Fork 831
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
Batch race condition fix #2630
Batch race condition fix #2630
Conversation
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Thu Nov 12 12:05:04 UTC 2020 impatient try |
Thu Nov 12 12:05:04 UTC 2020 impatient try |
write_counter += 1 | ||
|
||
|
||
def print_counters(): |
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.
remove
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.
it may be useful part of logging, right now they are very limited so at least having information how many lines were read and written out may be helpful
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.
removed
Thu Nov 12 12:06:25 UTC 2020 impatient try |
Thu Nov 12 12:06:35 UTC 2020 impatient try |
@@ -98,13 +132,14 @@ def _start_input_file_worker(q_in: Queue, input_data_path: str) -> None: | |||
for line in input_data_file: | |||
unique_id = str(uuid.uuid1()) | |||
q_in.put((enum_idx, unique_id, line)) | |||
increment_read() |
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.
remove
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.
done
/test integration |
Thu Nov 12 13:54:27 UTC 2020 impatient try |
Thu Nov 12 13:54:33 UTC 2020 impatient try |
Thu Nov 12 13:54:56 UTC 2020 impatient try |
|
||
counter += 1 | ||
if counter % 100 == 0: | ||
print(f"Processed instances: {counter}") |
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.
Not sure if this should be somehow configurable...
/test integration |
Thu Nov 12 14:08:43 UTC 2020 impatient try |
Thu Nov 12 14:08:57 UTC 2020 impatient try |
Thu Nov 12 14:09:14 UTC 2020 impatient try |
Integration failure in |
Thu Nov 12 15:59:12 UTC 2020 impatient try |
Thu Nov 12 15:59:13 UTC 2020 impatient try |
Thu Nov 12 16:34:25 UTC 2020 impatient try |
Thu Nov 12 16:34:25 UTC 2020 impatient try |
/test integration |
Fri Nov 13 15:28:20 UTC 2020 impatient try |
@RafalSkolasinski: The following test failed, say
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the jenkins-x/lighthouse repository. I understand the commands that are listed here. |
Only integration failure on |
What this PR does / why we need it:
Fixes race condition that sometimes occur in batch processor.
Under certain situation batch processor was exiting before it read input data or before all output data has been written.
This PR fixes it.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?: