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

Synchronize error propagation to prevent program freeze #145

Merged
merged 1 commit into from
Jan 14, 2021

Conversation

swilen-iwanow
Copy link
Contributor

@swilen-iwanow swilen-iwanow commented Jan 14, 2021

What this PR does / why we need it:
During the download of documents or resources that they refer to, the program is prone to errors (e.g "Resource not found"). Because of the concurrency model of Docforge, to collect these errors, from multiple workers a list of go channels is used. To synchronize the creation of error channels from the workers and to prevent multiple read/writes to the list, a read/write lock is added to the list.

Fixes #146

Release note:

Fixes a synchronization problem that was observed when having multiple errors during document download.

@gardener-robot gardener-robot added needs/review Needs review size/s Size of pull request is small (see gardener-robot robot/bots/size.py) labels Jan 14, 2021
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2021
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Jan 14, 2021
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2021
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Jan 14, 2021
@g-pavlov g-pavlov self-requested a review January 14, 2021 10:38
Copy link
Contributor

@g-pavlov g-pavlov left a comment

Choose a reason for hiding this comment

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

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Jan 14, 2021
@g-pavlov g-pavlov merged commit 0d5bd10 into master Jan 14, 2021
@swilen-iwanow swilen-iwanow deleted the error_block branch January 14, 2021 12:47
@g-pavlov g-pavlov linked an issue Jan 15, 2021 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging size/s Size of pull request is small (see gardener-robot robot/bots/size.py)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docforge blocks when multiple errors occur
6 participants