summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2026-05-14 17:41:42 +0200
committerChristian Breunig <christian@breunig.cc>2026-05-15 19:46:50 +0200
commit02a7f2ab71304f85343613dd074efdb16dbe0e68 (patch)
tree5ffab4b6ecea5244b807ba2a76b9d7c0004e3007 /src
parent08542c03c0d1ab2c114966f6fbd4c2b7c3a45b4a (diff)
downloadvyos-1x-02a7f2ab71304f85343613dd074efdb16dbe0e68.tar.gz
vyos-1x-02a7f2ab71304f85343613dd074efdb16dbe0e68.zip
vyos.commit: T8781: move from O(n) to O(1) for commit_in_progress() checks
Historically, commit_in_progress() used psutil.process_iter() to enumerate every process on the system and inspect open file descriptors under /proc in order to determine whether the configuration commit lock was held. That approach scales linearly with process count and incurs substantial overhead under load. Replace it with the shared lock-file utilities: attempt to acquire the commit lock using a non-blocking exclusive lock. If acquisition fails, another holder retains the lock and a commit is considered in progress; if it succeeds, no commit was active and the lock acquired for the probe is released immediately.
Diffstat (limited to 'src')
0 files changed, 0 insertions, 0 deletions