Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-18 Thread Joshua Harlow
Chris Friesen wrote: On 05/16/2017 10:45 AM, Joshua Harlow wrote: So fyi, If you really want something like this: Just use: http://fasteners.readthedocs.io/en/latest/api/lock.html#fasteners.lock.ReaderWriterLock And always get a write lock. It is a slightly different way of getting those

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-18 Thread Chris Friesen
On 05/16/2017 10:45 AM, Joshua Harlow wrote: So fyi, If you really want something like this: Just use: http://fasteners.readthedocs.io/en/latest/api/lock.html#fasteners.lock.ReaderWriterLock And always get a write lock. It is a slightly different way of getting those locks (via a context ma

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-16 Thread Joshua Harlow
Chris Friesen wrote: On 05/16/2017 10:45 AM, Joshua Harlow wrote: So fyi, If you really want something like this: Just use: http://fasteners.readthedocs.io/en/latest/api/lock.html#fasteners.lock.ReaderWriterLock And always get a write lock. It is a slightly different way of getting those

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-16 Thread Chris Friesen
On 05/16/2017 10:45 AM, Joshua Harlow wrote: So fyi, If you really want something like this: Just use: http://fasteners.readthedocs.io/en/latest/api/lock.html#fasteners.lock.ReaderWriterLock And always get a write lock. It is a slightly different way of getting those locks (via a context ma

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-16 Thread Joshua Harlow
So fyi, If you really want something like this: Just use: http://fasteners.readthedocs.io/en/latest/api/lock.html#fasteners.lock.ReaderWriterLock And always get a write lock. It is a slightly different way of getting those locks (via a context manager) but the implementation underneath is a

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-16 Thread Chris Friesen
On 05/15/2017 03:42 PM, Clint Byrum wrote: In order to implement fairness you'll need every lock request to happen in a FIFO queue. This is often implemented with a mutex-protected queue of condition variables. Since the mutex for the queue is only held while you append to the queue, you will al

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-15 Thread Clint Byrum
Excerpts from Ben Nemec's message of 2017-05-15 15:48:33 -0500: > > On 05/15/2017 03:24 PM, Doug Hellmann wrote: > > Excerpts from Legacy, Allain's message of 2017-05-15 19:20:46 +: > >>> -Original Message- > >>> From: Doug Hellmann [mailto:d...@doughellmann.com] > >>> Sent: Monday, Ma

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-15 Thread Ben Nemec
On 05/15/2017 03:24 PM, Doug Hellmann wrote: Excerpts from Legacy, Allain's message of 2017-05-15 19:20:46 +: -Original Message- From: Doug Hellmann [mailto:d...@doughellmann.com] Sent: Monday, May 15, 2017 2:55 PM <...> Excerpts from Legacy, Allain's message of 2017-05-15 18:35

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-15 Thread Doug Hellmann
Excerpts from Legacy, Allain's message of 2017-05-15 19:20:46 +: > > -Original Message- > > From: Doug Hellmann [mailto:d...@doughellmann.com] > > Sent: Monday, May 15, 2017 2:55 PM > <...> > > > > Excerpts from Legacy, Allain's message of 2017-05-15 18:35:58 +: > > > import eventl

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-15 Thread Legacy, Allain
> -Original Message- > From: Doug Hellmann [mailto:d...@doughellmann.com] > Sent: Monday, May 15, 2017 2:55 PM <...> > > Excerpts from Legacy, Allain's message of 2017-05-15 18:35:58 +: > > import eventlet > > eventlet.monkey_patch > > That's not calling monkey_patch -- there are no '

Re: [openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-15 Thread Doug Hellmann
Excerpts from Legacy, Allain's message of 2017-05-15 18:35:58 +: > Can someone comment on whether the following scenario has been discussed > before or whether this is viewed by the community as a bug? > > While debugging a couple of different issues our investigation has lead > us down the pa

[openstack-dev] [oslo][concurrency] lockutils lock fairness / starvation

2017-05-15 Thread Legacy, Allain
Can someone comment on whether the following scenario has been discussed before or whether this is viewed by the community as a bug? While debugging a couple of different issues our investigation has lead us down the path of needing to look at whether the oslo concurrency lock utilities are workin