Operational Remediation Reports
Atomic Guard Remediation Report
Turn the number of waiters behind a held guard into an enter, backoff, or page remediation action.
Atomic Guard Remediation Report
AtomicGuardRemediationReport.kt
fun main() {
val waiters =
val guardLimit = 2
val acquired = 1
val action = if (waiters == 0) {
"enter"
} else if (waiters <= guardLimit) {
"backoff"
} else {
"page"
}
println("waiters=$waiters acquired=$acquired $action")
}
fun main() {
val waiters =
val guardLimit = 2
val acquired = 1
val action = if (waiters == 0) {
"enter"
} else if (waiters <= guardLimit) {
"backoff"
} else {
"page"
}
println("waiters=$waiters acquired=$acquired $action")
}
fun main() {
val waiters =
val guardLimit = 2
val acquired = 1
val action = if (waiters == 0) {
"enter"
} else if (waiters <= guardLimit) {
"backoff"
} else {
"page"
}
println("waiters=$waiters acquired=$acquired $action")
}
guard contention
The waiter count behind a held guard is kept as a scalar, so the remediation action stays deterministic and never depends on atomic identity or scheduler timing.