Race condition in tests causing intermittent failures

Open Beginner friendly
#107 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
65/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Stale
Tech stack
go, ruby
Domain
testing-qa

Research direction

Start with interrupt_resume_test.rb and the status handler that sends SIGTERM when ROW_COPY_COMPLETED is received. Compare the send_signal call with the mentioned .kill behavior, then run the interrupt/resume test repeatedly; done means Ghostferry has exited before the handler returns and the intermittent extra-batch failure no longer occurs.

Written by the indexing model from the issue text.

Description

good first issue

In interrupt_resume_test.rb, we send SIGTERM to Ghostferry when ROW_COPY_COMPLETED is sent. However, the status handler doesn't wait until Ghostferry exits before returning. This means that Ghostferry is free to continue executing code, possibly moving an additional batch before quitting. Moving an additional batch results in a failed test occasionally.

To fix this, the send_signal call needs to be changed to something similar to .kill.

Dominant language
Go
Stars
855
Forks
74
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Shopify/ghostferry

All issues in Shopify/ghostferry

Similar issues

More Go issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.