Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Concurrent Segment Search] Add support for CollectorManager wrapping with profiling with concurrent aggregation #8332

Closed
ticheng-aws opened this issue Jun 29, 2023 · 0 comments · Fixed by #9129
Assignees
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request v2.10.0

Comments

@ticheng-aws
Copy link
Contributor

ticheng-aws commented Jun 29, 2023

Placeholder issue to support CollectorManager wrapping with profiling with concurrent aggregation flow (both for global and non-global aggregation). This will be a subtask for #7354.

In the multi-level aggregation profile with concurrent execution, the response’s collectors miss profiling aggregator information. This happens because the AggCollectorManager is not wrapped by the InternalProfileCollectorManager when the profile is enabled and concurrent execution takes place. To resolve the issue, we need to wrap all the sub-collectorManagers with the InternalProfileCollectorManager.

Example of a valid profile response with concurrent search enabled:

{
    ...
    "profile":
    {
        "shards":
        [
            {
                "id": "[3Z04lnEDTq6XiPVosv-tgA][index][0]",
                "inbound_network_time_in_millis": 0,
                "outbound_network_time_in_millis": 0,
                "searches":
                [
                    {
                        "query": [...],
                        "rewrite_time": 11001,
                        "collector":
                        [
                            {
                                "name": "QueryCollectorManager",
                                "reason": "search_multi",
                                "time_in_nanos": 3238624,
                                "reduce_time_in_nanos": 3601167,
                                "max_slice_time_in_nanos": 2177665,
                                "min_slice_time_in_nanos": 342251,
                                "avg_slice_time_in_nanos": 1712583,
                                "slice_count": 5,
                                "children":
                                [
                                    {
                                        "name": "SimpleTopDocsCollectorManager",
                                        "reason": "search_top_hits",
                                        "time_in_nanos": 1538416,
                                        "reduce_time_in_nanos": 684458,
                                        "max_slice_time_in_nanos": 326084,
                                        "min_slice_time_in_nanos": 184292,
                                        "avg_slice_time_in_nanos": 265216,
                                        "slice_count": 5
                                    },
                                    {
                                        "name": "NonGlobalAggCollectorManager",
                                        "reason": "aggregation",
                                        "time_in_nanos": 2255000,
                                        "reduce_time_in_nanos": 2838750,
                                        "max_slice_time_in_nanos": 1045209,
                                        "min_slice_time_in_nanos": 152250,
                                        "avg_slice_time_in_nanos": 826808,
                                        "slice_count": 5
                                    }
                                ]
                            }
                        ]
                    },
                    {
                        "query": [...],
                        "rewrite_time": 2833,
                        "collector":
                        [
                            {
                                "name": "GlobalAggCollectorManager",
                                "reason": "aggregation_global",
                                "time_in_nanos": 657625,
                                "reduce_time_in_nanos": 399416,
                                "max_slice_time_in_nanos": 503000,
                                "min_slice_time_in_nanos": 28999,
                                "avg_slice_time_in_nanos": 217357,
                                "slice_count": 5
                            }
                        ]
                    }
                ],
                "aggregations": [...]
            }
        ]
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request v2.10.0
Projects
Status: Done
3 participants