-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Data race causes flaky test in "clone" #276
Comments
I was thinking about just making it iterative, but then wouldn't almost by definition, if there is a data race that occasionally happens, it be because of the ordering of the sequences? |
This'll be in the ligation function btw, almost 100% sure. |
Is the expectation for a single clone site in the test based on independent analysis of the fragments, or was it the value that passed? I ask because a naive approach to avoiding the race (creating a new slice for every recursion, then writing in the values) consistently fails as it returns 2 clones.
|
^@Koeng101 do you know the answer to this question from @micrictor? |
I'm not sure I entirely understand the question - but if I'm getting it right: I passed in values for the tests that I know the output of. Is the naive version on a branch or something? I'd love to see it. I'm also thinking this is something that needs to be fixed soon, since I'm using Ligate a lot more for my work, and the flaky-ness is causing me some problems. I'm thinking I might have to go for a full rewrite with this one... |
My question is whether the test results are known to be accurate chemistry, namely whether it's impossible that there's two valid clones of the input fragments. I have the diff for the change above. |
It is possible to have many, many valid clones based on input fragments. I think I might want to change this, because it can be a little confusing and combinatorially explodes very quickly. In particular you might have a cloning reaction where you are switching out different protein sequences (let's say, to change the color of GFP). You'd clone the same promoter+rbs+terminator, but might have a lot of variations of the CDS. |
@Koeng101 if I had to guess, there might be some missing or additional infinite constructs coming back depending on what happened during the race since those slices are share some of the same underlying data. With that being said, it might be advantageous to remove the concurrency from clone to solve the issue. I opened up a draft with some measurements here: #393. Removing the concurrency makes GoldenGate consistent and maybe a good step towards the clone refactor and improving performance. |
Describe the bug
When running
clone
tests in a repeated way,TestSignalKilledGoldenGate
randomly fails. I believe this might be caused by data races in theclone
package, as reported bygo test -race ./clone
:To Reproduce
Steps to reproduce the behavior:
go test -count 10 -v ./clone/
go test -race ./clone
on the main directory.Expected behavior
Data race should be fixed.
The text was updated successfully, but these errors were encountered: