Skip to content

Address test races caused by deferred logs #6841

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

Merged

Conversation

taylanisikdemir
Copy link
Member

@taylanisikdemir taylanisikdemir commented Apr 19, 2025

What changed?

The recently added deferred lifecycle logs (#6838) caused races during tests because

  1. shutdownWG was marked as done before the final log due to missoredered defers in queue processors
  2. Stop implementation in queue processor base is not leak free (doesn't wait for underlying goroutines to return) which causes late logs so changed those by moving the log line to the bottom instead of deferring.

Why?
Reduce test flakiness

How did you test it?
go test -timeout 90s github.com/uber/cadence/service/history/queue -race -count 10

@taylanisikdemir taylanisikdemir merged commit eda6264 into cadence-workflow:master Apr 21, 2025
23 checks passed
@taylanisikdemir taylanisikdemir deleted the taylan/log_races branch April 21, 2025 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants