-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: cgroup view sorting was broken by previous change because when a SingleCgroupModelFieldId is convert into a CgroupModelFieldId, a None path is used, which always queries None as result. When sorting cgroup view, we use SingleCgroupModelFieldId as sort order to sort nested CgroupModels (sort by query result). If query returns None, then all CgroupModels have the same order and thus no sorting happens. The main issue is that None path should only be used for listing available field ids (see common_field_ids.rs). Anywhere else should be invalid. The fix is simply making path non-None everywhere except for using as Sequence. This diff introduces some defensive mechanisms to make it harder to use None path for query. A private trait DelegatedSequence which has no variant on its own but wraps another Sequence is created. It delegates all methods to its inner Sequence. Conversion from SingleCgroupModelFieldId to CgroupModelFieldId is now explicit (no more From trait). The same is applied to VectorFieldId and BTreeMapFieldId which work similarly. Reviewed By: brianc118 Differential Revision: D48651323 fbshipit-source-id: 6e31f72d534e60442222f5ae5fd53c9b7ba0bd00
- Loading branch information
1 parent
d5eab1e
commit 74de07d
Showing
4 changed files
with
82 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters