chia7712 commented on code in PR #843:
URL: https://github.com/apache/yunikorn-core/pull/843#discussion_r1566324989
##########
pkg/locking/locking.go:
##########
@@ -74,13 +77,26 @@ func reInit() {
godeadlock.Opts.DeadlockTimeout = time.Duration(timeoutSec) *
time.Second
godeadlock.Opts.LogBuf = &errorBuf{}
godeadlock.Opts.OnPotentialDeadlock = onPotentialDeadlock
+ if exitEnv, err := strconv.ParseBool(os.Getenv(EnvExitOnDeadlock)); err
!= nil {
+ exitOnDeadlock = false
+ } else {
+ exitOnDeadlock = exitEnv
+ }
+
if enabled {
- fmt.Fprintf(os.Stderr, "=== Deadlock detection enabled
(timeout: %d seconds) ===\n", timeoutSec)
+ fmt.Fprintf(os.Stderr, "=== Deadlock detection enabled
(timeout: %d seconds, exit on deadlock: %v) ===\n", timeoutSec, exitOnDeadlock)
Review Comment:
this is not related to this PR, but why we don't use
`log.Log(log.Diagnostics).Error`?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]