Open hantangwangd opened 2 years ago
You should set the subgroup scheduling policy as QUERY_PRIORITY else it will default to FAIR policy and that might be the reason of it to not succeed. Please give it a try first.
You should set the subgroup scheduling policy as QUERY_PRIORITY else it will default to FAIR policy and that might be the reason of it to not succeed. Please give it a try first.
@swapsmagic InternalResourceGroup seems like to do customized logic to QUERY_PRIORITY policy: if a group's scheduling policy is QUERY_PRIORITY, it will automaticly set its subgroup's scheduling policy to QUERY_PRIORITY. And I confirm again that all groups are in QUERY_PRIORITY policy in test case.
When I submit queries to resourceGroups configured deeper than 2 levels, I found it doesn't work so well, the reason is intermediate subGroup's getHighestQueryPriority() do not calculate correctly. The test case as follows:
`public void testPrioritySchedulingInResourceGroupTreeDeeperThan2Level() { RootInternalResourceGroup root = new RootInternalResourceGroup("root", (group, export) -> {}, directExecutor(), ignored -> Optional.empty(), rg -> false); root.setSoftMemoryLimit(new DataSize(1, MEGABYTE)); root.setMaxQueuedQueries(100); // Start with zero capacity, so that nothing starts running until we've added all the queries root.setHardConcurrencyLimit(0); root.setSchedulingPolicy(QUERY_PRIORITY);