Refactor QuotaManager to improve maintainability
Categories
(Core :: Storage: Quota Manager, task)
Tracking
()
People
(Reporter: sg, Assigned: sg)
References
(Blocks 1 open bug)
Details
Attachments
(7 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 | |
Bug 1685677 - Reduce scope of variables only used within an if statement. r=#dom-workers-and-storage
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review | |
48 bytes,
text/x-phabricator-request
|
Details | Review |
Refactor QuotaManager to improve maintainability by
- reducing statefulness
- splitting up large member functions
Assignee | ||
Comment 1•5 years ago
|
||
Depends on D101143
Assignee | ||
Comment 2•5 years ago
|
||
Extracts parts of CheckTemporaryStorageLimits into the following new private
member functions of QuotaManager:
- LockedGetOriginInfosExceedingGroupLimits
- LockedGetOriginInfosExceedingOverallLimits
- RemoveQuotaForOrigins
Depends on D101144
Assignee | ||
Comment 3•5 years ago
|
||
Instead of inserting all elements into OriginInfo array, and then removing
or skipping irrelevant entries, only insert the relevant ones in the first
place, using a new utility function template MaybeAppendOriginInfos.
Sort them by the LRU timestamp.
Iterate over them to identify the threshold.
Finally, truncate the array to the threshold position.
Depends on D101145
Assignee | ||
Comment 4•5 years ago
|
||
Depends on D101146
Assignee | ||
Comment 5•5 years ago
|
||
Depends on D101151
Assignee | ||
Comment 6•5 years ago
|
||
Depends on D101181
Assignee | ||
Comment 7•5 years ago
|
||
Depends on D101182
Comment 9•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Comment 10•5 years ago
|
||
Comment 11•5 years ago
|
||
Backed out for causing xpchell failures in test_storagePressure
Backout link: https://hg.mozilla.org/integration/autoland/rev/082a0d699c97597eed40e6344ddcba2669777266
Failure log: https://treeherder.mozilla.org/logviewer?job_id=328449861&repo=autoland&lineNumber=3069
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
Backed out for causing xpcshell failure.
Backout link: https://hg.mozilla.org/integration/autoland/rev/e993b42aae33f4283e9e62d28454f403bf8dd66f
Failure log: https://treeherder.mozilla.org/logviewer?job_id=328483074&repo=autoland&lineNumber=3140
Comment 14•5 years ago
|
||
Comment 15•5 years ago
|
||
Backed out for causing build bustage in test/gtest/TestFlatten.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/b10d7b687fd4ba85459d7cecac7a8d6130a197f5
Failure log: https://treeherder.mozilla.org/logviewer?job_id=328558399&repo=autoland&lineNumber=9791
Comment 16•5 years ago
|
||
Comment 17•5 years ago
|
||
Backed out for bustage on TestFlatten.cpp
backout: https://hg.mozilla.org/integration/autoland/rev/49fff125656d073e955a3066327bc7c405d69cc7
failure log: https://treeherder.mozilla.org/logviewer?job_id=328577529&repo=autoland&lineNumber=36336
[task 2021-02-02T15:02:17.775Z] 15:02:17 INFO - In file included from /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:383:0,
[task 2021-02-02T15:02:17.775Z] 15:02:17 INFO - from /builds/worker/checkouts/gecko/dom/quota/test/gtest/TestCheckedUnsafePtr.cpp:7,
[task 2021-02-02T15:02:17.775Z] 15:02:17 INFO - from Unified_cpp_dom_quota_test_gtest0.cpp:2:
[task 2021-02-02T15:02:17.775Z] 15:02:17 INFO - /builds/worker/checkouts/gecko/dom/quota/test/gtest/TestFlatten.cpp: In member function 'virtual void mozilla::dom::quota::Flatten_NestedInnerSingulars_Test::TestBody()':
[task 2021-02-02T15:02:17.775Z] 15:02:17 ERROR - /builds/worker/checkouts/gecko/dom/quota/test/gtest/TestFlatten.cpp:60:29: error: class template argument deduction failed:
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - EXPECT_EQ((nsTArray{{1, 2}}), flattened);
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - ^
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h:76:52: note: in definition of macro 'GTEST_ASSERT_'
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - if (const ::testing::AssertionResult gtest_ar = (expression))
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - ^~~~~~~~~~
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest_pred_impl.h:161:3: note: in expansion of macro 'GTEST_PRED_FORMAT2_'
[task 2021-02-02T15:02:17.787Z] 15:02:17 INFO - GTEST_PRED_FORMAT2_(pred_format, v1, v2, GTEST_NONFATAL_FAILURE_)
[task 2021-02-02T15:02:17.788Z] 15:02:17 INFO - ^~~~~~~~~~~~~~~~~~~
[task 2021-02-02T15:02:17.791Z] 15:02:17 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:1968:3: note: in expansion of macro 'EXPECT_PRED_FORMAT2'
[task 2021-02-02T15:02:17.791Z] 15:02:17 INFO - EXPECT_PRED_FORMAT2(::testing::internal::
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - ^~~~~~~~~~~~~~~~~~~
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - /builds/worker/workspace/obj-build/dist/include/gtest/gtest.h:1969:32: note: in expansion of macro 'GTEST_IS_NULL_LITERAL_'
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - EqHelper<GTEST_IS_NULL_LITERAL_(val1)>::Compare,
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - ^~~~~~~~~~~~~~~~~~~~~~
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - /builds/worker/checkouts/gecko/dom/quota/test/gtest/TestFlatten.cpp:60:3: note: in expansion of macro 'EXPECT_EQ'
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - EXPECT_EQ((nsTArray{{1, 2}}), flattened);
[task 2021-02-02T15:02:17.792Z] 15:02:17 INFO - ^~~~~~~~~
[task 2021-02-02T15:02:17.792Z] 15:02:17 ERROR - /builds/worker/checkouts/gecko/dom/quota/test/gtest/TestFlatten.cpp:60:29: error: no matching function for call to 'nsTArray(<brace-enclosed initializer list>)'
[task 2021-02-02T15:02:17.793Z] 15:02:17 INFO - EXPECT_EQ((nsTArray{{1, 2}}), flattened);
Comment 18•5 years ago
|
||
Assignee | ||
Comment 19•5 years ago
|
||
Sorry for the repeated backouts, I hope it's eventually fine now. I manually triggered the base toolchain builds on https://treeherder.mozilla.org/jobs?repo=try&revision=5ba0de2953ea36b556f6cc5c7c1801a3215deaea&selectedTaskRun=YWWCfD__RJuchOITEOCh1Q.0 and they look good now.
Comment 20•5 years ago
|
||
bugherder |
Comment 21•5 years ago
|
||
Comment 22•5 years ago
|
||
bugherder |
Assignee | ||
Updated•5 years ago
|
Comment 23•5 years ago
|
||
Comment 24•5 years ago
|
||
bugherder |
Updated•5 years ago
|
Updated•5 years ago
|
Description
•