[
https://issues.apache.org/jira/browse/YUNIKORN-2262?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17865832#comment-17865832
]
Wilfred Spiegelenburg commented on YUNIKORN-2262:
-------------------------------------------------
That works because {{fmt.Errorf()}} under the hood does what the join does and
creates an object that implements Unwrap etc. It does so by interpreting the
format string and when it sees a %w it takes the arg and places it in an array.
Adding format string scanning overhead etc.
So why not make it explicit and make the code more performant and readable.
Unless you need a combination of multiple format directives using
{{fmt.Errorf}} will be slower than just {{errors.Join()}}
> propagate the error message when queue creation gets failed
> -----------------------------------------------------------
>
> Key: YUNIKORN-2262
> URL: https://issues.apache.org/jira/browse/YUNIKORN-2262
> Project: Apache YuniKorn
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: Chenchen Lai
> Priority: Minor
>
> [https://github.com/apache/yunikorn-core/blob/master/pkg/scheduler/partition.go#L334]
> the error message of root cause is swallowed, so it is hard to be inspired by
> the common message "failed to create rule based queue ..."
> BTW, the error I met is the parent queue "is already a leaf". The error
> message is helpful and it makes us catch up the root cause easily.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]