Unverified Commit 4eabc1cc authored by Lubomir I. Ivanov's avatar Lubomir I. Ivanov Committed by GitHub

Revert "Speculative workaround for #74890"

parent d5a3db00
......@@ -24,7 +24,7 @@ import (
"path/filepath"
"regexp"
"strings"
"sync/atomic"
"sync"
"time"
"k8s.io/apimachinery/pkg/util/version"
......@@ -434,19 +434,11 @@ type chaosMonkeyAdapter struct {
func (cma *chaosMonkeyAdapter) Test(sem *chaosmonkey.Semaphore) {
start := time.Now()
// Using an atomic with a CAS is a potential workaround for #74890.
//
// This is a speculative workaround - we are really seeing if
// this is better; if not we should revert.
//
// If it is better we should file a bug against go 1.12, and
// then revert!
var onceWithoutMutex uint32
var once sync.Once
ready := func() {
if atomic.CompareAndSwapUint32(&onceWithoutMutex, 0, 1) {
once.Do(func() {
sem.Ready()
}
})
}
defer finalizeUpgradeTest(start, cma.testReport)
defer ready()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment