Hi Fujii,
Thanks for the patch. The rate-limiting approach makes sense to me. A couple of thoughts:
1) I think Chao Li's suggestion of using max(10s, deadlock_timeout) as the rate limit interval is worth adopting. If
someonehas set deadlock_timeout to, say, 30s or 60s, they've already signaled they don't need frequent lock-wait
feedback.Logging every 10s after a 60s deadlock_timeout feels inconsistent with that intent.
2) The hardcoded 10s constant — could we define it as a named constant in a header file? That way it's easier to find
andreason about if it ever needs to change.
3) Would it make sense to add a regression test for this? Something that verifies the rate limiting actually suppresses
therepeated messages at the expected interval.
Regards,