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

Batch race condition fix #2630

Merged
merged 5 commits into from
Nov 13, 2020
Merged

Batch race condition fix #2630

merged 5 commits into from
Nov 13, 2020

Conversation

RafalSkolasinski
Copy link
Contributor

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?:

None

@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@seldondev
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
To complete the pull request process, please assign rafalskolasinski
You can assign the PR to them by writing /assign @rafalskolasinski in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@seldondev seldondev added size/M and removed size/XXL labels Nov 12, 2020
@seldondev
Copy link
Collaborator

Thu Nov 12 12:05:04 UTC 2020
The logs for [lint] [2] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/2.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=2

@seldondev
Copy link
Collaborator

Thu Nov 12 12:05:04 UTC 2020
The logs for [pr-build] [1] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/1.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=1

write_counter += 1


def print_counters():
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Contributor Author

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@seldondev
Copy link
Collaborator

Thu Nov 12 12:06:25 UTC 2020
The logs for [pr-build] [3] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/3.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=3

@seldondev
Copy link
Collaborator

Thu Nov 12 12:06:35 UTC 2020
The logs for [lint] [4] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/4.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=4

@@ -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()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@RafalSkolasinski
Copy link
Contributor Author

/test integration

@seldondev
Copy link
Collaborator

Thu Nov 12 13:54:27 UTC 2020
The logs for [pr-build] [5] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/5.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=5

@seldondev
Copy link
Collaborator

Thu Nov 12 13:54:33 UTC 2020
The logs for [lint] [6] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/6.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=6

@seldondev
Copy link
Collaborator

Thu Nov 12 13:54:56 UTC 2020
The logs for [integration] [7] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/7.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=7


counter += 1
if counter % 100 == 0:
print(f"Processed instances: {counter}")
Copy link
Contributor Author

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...

@RafalSkolasinski
Copy link
Contributor Author

/test integration

@seldondev
Copy link
Collaborator

Thu Nov 12 14:08:43 UTC 2020
The logs for [pr-build] [8] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/8.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=8

@seldondev
Copy link
Collaborator

Thu Nov 12 14:08:57 UTC 2020
The logs for [lint] [9] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/9.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=9

@seldondev
Copy link
Collaborator

Thu Nov 12 14:09:14 UTC 2020
The logs for [integration] [10] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/10.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=10

@RafalSkolasinski
Copy link
Contributor Author

Integration failure in TestPrepack.test_sklearn_v2

@seldondev
Copy link
Collaborator

Thu Nov 12 15:59:12 UTC 2020
The logs for [lint] [12] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/12.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=12

@seldondev
Copy link
Collaborator

Thu Nov 12 15:59:13 UTC 2020
The logs for [pr-build] [11] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/11.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=11

@seldondev
Copy link
Collaborator

Thu Nov 12 16:34:25 UTC 2020
The logs for [pr-build] [13] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/13.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=13

@seldondev
Copy link
Collaborator

Thu Nov 12 16:34:25 UTC 2020
The logs for [lint] [14] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/14.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=14

@RafalSkolasinski
Copy link
Contributor Author

/test integration

@seldondev
Copy link
Collaborator

Fri Nov 13 15:28:20 UTC 2020
The logs for [integration] [15] will show after the pipeline context has finished.
https://github.com/SeldonIO/seldon-core/blob/gh-pages/jenkins-x/logs/SeldonIO/seldon-core/PR-2630/15.log

impatient try
jx get build logs SeldonIO/seldon-core/PR-2630 --build=15

@seldondev
Copy link
Collaborator

@RafalSkolasinski: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
integration 97d15eb link /test integration

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.

@RafalSkolasinski
Copy link
Contributor Author

Only integration failure on TestPrepack.test_sklearn_v2 ,
Unless there is anything to fix, we should merge it.

@axsaucedo axsaucedo merged commit 0765b3b into SeldonIO:master Nov 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants