Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
GitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
Hacky but workable fix for race condition surfaced by If-None-Exists creates #660
Per our discussion here: 3db4091
Some notes from other attempts I made to fix this in a less hacky way:
…creates. Some notes from other attempts I made to fix this in a less hacky way: * Tried to @autowire myResourceDaos from a setter (rather than using the annotation on a field), and initialize myResourceTypeToDao in that setter, instead. Couldn't get it to work: Spring started throwing odd bean dependency errors. Don't really understand why. * Tried to move the exceptions being thrown on null getDao(Class) results into that method, but that was breaking a test case. Didn't investigate why.
Confirmed fix: with this in place, I've got an in-progress benchmark run that has made it through over 3M
@jamesagnew: I don't think the code coverage difference here is meaningful, but it's your project, not mine. In general, a regression test case for this issue would need to push... 30K or so resources into a FHIR server asynchronously, using... at least dozens of threads. (Like I said, our benchmarks were dying after a few thousand requests, but they were using 390 threads on giant EC2 instances. We just weren't seeing this in our local dev builds/runs.) Thoughts?
This includes the fix from jamesagnew#660.