-
-
Notifications
You must be signed in to change notification settings - Fork 500
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
fix: proper synchronisation for start/stop log production #2576
Merged
mdelapenya
merged 5 commits into
testcontainers:main
from
mdelapenya:fix-log-consumer-race
Jun 17, 2024
Merged
fix: proper synchronisation for start/stop log production #2576
mdelapenya
merged 5 commits into
testcontainers:main
from
mdelapenya:fix-log-consumer-race
Jun 17, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✅ Deploy Preview for testcontainers-go ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
mdelapenya
added a commit
that referenced
this pull request
Jun 17, 2024
* fix: proper synchronisation for start/stop log production * fix: protect channel close * fix: properly close the log channel * chore: do not close the channel
mdelapenya
added a commit
that referenced
this pull request
Jun 18, 2024
* fix: proper synchronisation for start/stop log production * fix: protect channel close * fix: properly close the log channel * chore: do not close the channel
mdelapenya
added a commit
that referenced
this pull request
Jun 18, 2024
* fix: proper synchronisation for start/stop log production * fix: protect channel close * fix: properly close the log channel * chore: do not close the channel
mdelapenya
added a commit
to mdelapenya/testcontainers-go
that referenced
this pull request
Jun 24, 2024
* main: docs: document disabling ryuk with properties (testcontainers#2603) fix: allow compose files and readers to be used together (testcontainers#2598) chore(deps): bump urllib3 from 2.2.1 to 2.2.2 (testcontainers#2590) docs: example for NATS cluster (testcontainers#2591) docs: fix deprecation for material extensions emoji (testcontainers#2592) gha: update golangci-lint to v1.59.1 (testcontainers#2588) network: WithCheckDuplicate: don't set CheckDuplicate value (testcontainers#2589) fix: proper synchronisation for start/stop log production (testcontainers#2576) chore(deps): bump github.com/docker/docker from v25.0.5 to v26.1.4 (testcontainers#2584) docs: update contributing guide (testcontainers#2586) feat: add testcontainers labels to the built images (testcontainers#2579) feat(mongodb): Make the replica set name configurable (testcontainers#2538) chore: skip reaper tests if ryuk is disabled (testcontainers#2582) chore: increase check time to 60 secs instead of 20 (testcontainers#2581) fix: prepend substitutors for built images (testcontainers#2577) docs: update colima docs (testcontainers#2578) fix(cockroachdb): Fixes cockroachdb wait strategy handling (testcontainers#2456) Fix race condition when looking up reaper (ryuk) container (testcontainers#2508) chore: bring golangci-lint back (testcontainers#2571) docs(compose): Fix typo docker compose docs (testcontainers#2565)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This PR simplifies the sync mechanisms for starting and stopping the produciton of logs:
See https://go.dev/play/p/x0pOElF2Vjf, where we have created a simplified scenario for it.
As a consequence, the mutex is not needed anymore, as the synchronisation happens with channels and wait groups.
The test proposed in the issue report has been added to the log consumers tests.
Why is it important?
Lots of spaguetti code for the synchronisation, that has been simplified thanks to going to first principles (see https://go.dev/play/p/x0pOElF2Vjf)
Related issues