On Apr 22, 2013, at 9:40 AM, Francesco Vollero wrote: > Il 4/22/13 3:32 PM, Joseph VLcek ha scritto: >> On Apr 18, 2013, at 7:15 AM, Michal Fojtik wrote: >> >>> Hi, >>> >>> I recently discovered an interesting bug, that occurs when you do a lot of >>> parallel requests to Deltacloud API. >>> >>> Let say you start Deltacloud API with the 'mock' driver as default driver. >>> Then you do 3 parallel requests to retrieve RHEV-M images, realms and >>> hardware_profiles. In that case I get this error: >>> >>> <snip> > [snip] >> >> Hey Michal, >> >> As I mentioned in IRC last week the research I did seems to indicate the >> solution you present here >> is the right way to go. >> >> This describes the problem you found: >> http://betterlogic.com/roger/2008/10/rubys-require-is-not-thread-safe/ >> >> This describes the Ruby threading and seems to support your proposed >> solution of using Thread.exclusive. >> http://cs.calvin.edu/curriculum/cs/214/adams/labs/11/ruby/ >> >> >> So it seems your solution is the correct way to go. > > thanks Joe for give us those links. > At the moment I am trying to test when is happening giving more load to the > various instances. > In this way we will be able to actually pin point what/when/why is happening > in a clear way. > > -FV > > >> Joe >> >> >
Great! Not sure if it is worth it but one suggestion I have would be to write a small snippet of code that kicks off multiple threads of deltacloud as close to simultaneous as possible. I realize this may not be what happens in the real world but may be the best way to iron out this issue. ... Just a suggestion. Thanks! Joe