Taskflow has a reader/writer lock that is likely useful
to other projects; and it seems better at home in this
module.
The class provides a way to create reader/writer locks
where there may be many readers at the same time (but
only one writer). It does not allow (currently) for privilege
escalation (but this could be added with limited support
in the future).
Change-Id: Ie763ef92f31c34869d83a533bc8761b0fbd77217
In Neutron, we usually specify lock_path as:
lock_path = $state_path/lock
It turned out that ConfigFilter does not work correctly with
substitution feature, so its usage blocks Neutron adoption of the
library.
The issue is also not specific to Neutron: any deployer should be able
to use substitutions ($smth) in their configuration files without
determining whether those configuration options he's interested in are
defined as ConfigOpts or ConfigFilter.
So the best short term approach to push forward the adoption of the
library is to refrain from using ConfigFilter at least until there is
consensus on how to support substitution feature with the class.
Once oslo.config sorts the issue out, we may get back to using
ConfigFilter for lockutils.
Change-Id: I7b0b5c840381b2d9afc00ff116fee1d970743183
Closes-Bug: #1399897
Sometime in a future retrying version there will
likely/hopefully exist a ability to more easily
filter on specific exceptions; this commit adds a
note to the upstream pull request that may add this
feature.
Change-Id: I44f1c9fe4fbbd5f77032ca7bfff4e2e6b7ff7622
When a lock can't be acquired there is currently a hard coded
delay (0.01) that is used before trying again, instead of having
a hard coded delay we should allow this delay to be configured
since having it set at a hard coded value can limit concurrency (if
the delay is actually way to high) or cause to much contention (if
the delay is actually way to low).
This review adds on that logic and also uses the retrying library
to perform the acquisition attempts (and associated failures when/if
they occur); as well as shows logs after a given amount of time has
elapsed with the logs being output at a given periodicity.
Change-Id: Ideeefba1439ddd677c608d01becb4f6a0d4bc83d
It can be undesirable to have a globally shared sempahore
container, especially since oslo.concurrency can now be shared
among many disjoint applications and libraries.
When a single container is used it is now possible to have those
disjoint applications/libraries collide on the same sempahore names.
This is not a good pattern to continue with, so in order to move away
from it allow a custom container to be provided (which defaults to the
existing global one) so that users of oslo.concurrency may provide there
own container if they so desire.
Change-Id: I9aab42e21ba0f52997de3e7c9b0fea51db5c7289
Move the public API out of oslo.concurrency to oslo_concurrency. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.
bp/drop-namespace-packages
Change-Id: I20d1647b1c3ef8cab3b69eccfe168eeb01703b72