Refactor directory lock implementation to eliminate virtual methods and multiple inheritance
Categories
(Core :: Storage: Quota Manager, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox133 | --- | fixed |
People
(Reporter: janv, Assigned: janv)
References
(Blocks 1 open bug)
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•1 year 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•1 year 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•1 year ago
|
||
All directory locks use these types under the hood, so it makes more sense to
have them in DirectoryLock class.
| Assignee | ||
Comment 4•1 year ago
|
||
This patch also cleans up the declaration and definition order. There are no
other functional changes.
| Assignee | ||
Comment 5•1 year ago
|
||
| Assignee | ||
Comment 6•1 year ago
|
||
| Assignee | ||
Comment 7•1 year ago
|
||
| Assignee | ||
Comment 8•1 year ago
|
||
| Assignee | ||
Comment 9•1 year ago
|
||
| Assignee | ||
Comment 10•1 year ago
|
||
| Assignee | ||
Comment 11•1 year ago
|
||
| Assignee | ||
Comment 12•1 year ago
|
||
| Assignee | ||
Comment 13•1 year ago
|
||
| Assignee | ||
Comment 14•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 15•1 year ago
|
||
| Assignee | ||
Comment 16•1 year ago
|
||
| Assignee | ||
Comment 17•1 year ago
|
||
Only quota manager will be able to create directory locks directly.
Updated•1 year ago
|
Comment 18•1 year ago
|
||
| Assignee | ||
Updated•1 year ago
|
Comment 19•1 year ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/369f6badda31
https://hg.mozilla.org/mozilla-central/rev/221c3087333b
https://hg.mozilla.org/mozilla-central/rev/e94f4986d788
https://hg.mozilla.org/mozilla-central/rev/479fe5252960
https://hg.mozilla.org/mozilla-central/rev/a0f76b09a7d3
https://hg.mozilla.org/mozilla-central/rev/c7409587c4de
https://hg.mozilla.org/mozilla-central/rev/165107cddd62
https://hg.mozilla.org/mozilla-central/rev/a50de6413cd9
https://hg.mozilla.org/mozilla-central/rev/f671382d3c98
https://hg.mozilla.org/mozilla-central/rev/f73eaba1fa96
https://hg.mozilla.org/mozilla-central/rev/e20ecdb1fc57
https://hg.mozilla.org/mozilla-central/rev/e7c62a4ffac4
https://hg.mozilla.org/mozilla-central/rev/297dd4fd6349
https://hg.mozilla.org/mozilla-central/rev/3929ef7e5f11
https://hg.mozilla.org/mozilla-central/rev/3c8fed991027
https://hg.mozilla.org/mozilla-central/rev/0ab96fb7ea5b
https://hg.mozilla.org/mozilla-central/rev/3b61ed2478fb
Description
•