Refactor directory lock implementation to eliminate virtual methods and multiple inheritance
Categories
(Core :: Storage: Quota Manager, task, P2)
Tracking
()
People
(Reporter: janv, Assigned: janv)
References
(Depends on 1 open bug, Blocks 2 open bugs)
Details
Attachments
(17 files)
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
There are currently DirectoryLock
, OriginDirectoryLock
, ClientDirectoryLock
and UniversalDirectoryLock
base classes with pure virtual functions only and then there's DirectoryLockImpl
which implements those kind of interfaces. This was an attempt to hide implementation details.
The abstraction has its cost obviously, especially caused by virtual calls. Most of other classes used by quota clients don't have abstraction like that. Besides aligning the design and elimination of virtual methods, the current design makes it hard to add a new method for preparing a directory lock before Acquire
is actually called (there will be a separate bug for that).
Assignee | ||
Comment 1•8 days ago
|
||
These files will serve as a base for new source files, so it's better to clean
them up before that.
Assignee | ||
Comment 2•8 days ago
|
||
Consumers should include corresponding headers for concrete type instead. This
will be especially needed when there will be separate includes for different
types of locks.
Assignee | ||
Comment 3•8 days ago
|
||
All directory locks use these types under the hood, so it makes more sense to
have them in DirectoryLock class.
Assignee | ||
Comment 4•8 days ago
|
||
This patch also cleans up the declaration and definition order. There are no
other functional changes.
Assignee | ||
Comment 5•8 days ago
|
||
Assignee | ||
Comment 6•8 days ago
|
||
Assignee | ||
Comment 7•8 days ago
|
||
Assignee | ||
Comment 8•8 days ago
|
||
Assignee | ||
Comment 9•8 days ago
|
||
Assignee | ||
Comment 10•8 days ago
|
||
Assignee | ||
Comment 11•8 days ago
|
||
Assignee | ||
Comment 12•8 days ago
|
||
Assignee | ||
Comment 13•8 days ago
|
||
Assignee | ||
Comment 14•8 days ago
|
||
Updated•8 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Updated•8 days ago
|
Assignee | ||
Comment 15•8 days ago
|
||
Assignee | ||
Comment 16•8 days ago
|
||
Assignee | ||
Comment 17•7 days ago
|
||
Only quota manager will be able to create directory locks directly.
Description
•