Commit ab2cd91
committed
fix(core): remove KB rebuild lock that silently blocked first-run sync
The file-based lock in _check_and_run_pending_rebuild had a 300s stale
threshold. Any subprocess that imported omnipkg and crashed before its
finally block ran would leave a ghost lock file, silently skipping the
KB rebuild for up to 5 minutes on every subsequent invocation — causing
the "KB rebuild already in progress" warning with nothing actually running.
Redis writes are atomic and idempotent. Two concurrent rebuilds produce
identical results, so the lock bought nothing except the ability to get
stuck. Redundant work on first-run is acceptable; a silently empty KB is
not, especially since first-run can legitimately take 3+ minutes on large
environments (safety install, full metadata scan, etc.).
Also remove the dead second call to _check_and_run_pending_rebuild in
_synchronize_knowledge_base_with_reality — result was discarded with
`pass`, rebuild already runs at the top of that function.1 parent 3df57c8 commit ab2cd91
1 file changed
Lines changed: 4 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7901 | 7901 | | |
7902 | 7902 | | |
7903 | 7903 | | |
7904 | | - | |
7905 | | - | |
7906 | | - | |
7907 | | - | |
7908 | | - | |
7909 | | - | |
7910 | | - | |
7911 | | - | |
7912 | | - | |
7913 | | - | |
7914 | | - | |
7915 | | - | |
7916 | | - | |
7917 | | - | |
7918 | | - | |
7919 | | - | |
7920 | | - | |
7921 | | - | |
7922 | | - | |
7923 | | - | |
7924 | | - | |
7925 | | - | |
7926 | | - | |
7927 | | - | |
7928 | | - | |
7929 | | - | |
7930 | | - | |
7931 | | - | |
7932 | | - | |
7933 | | - | |
7934 | | - | |
7935 | | - | |
7936 | | - | |
7937 | | - | |
7938 | | - | |
7939 | | - | |
7940 | | - | |
| 7904 | + | |
| 7905 | + | |
| 7906 | + | |
7941 | 7907 | | |
7942 | 7908 | | |
7943 | 7909 | | |
| |||
7980 | 7946 | | |
7981 | 7947 | | |
7982 | 7948 | | |
7983 | | - | |
7984 | | - | |
| 7949 | + | |
7985 | 7950 | | |
7986 | 7951 | | |
7987 | 7952 | | |
| |||
8318 | 8283 | | |
8319 | 8284 | | |
8320 | 8285 | | |
8321 | | - | |
8322 | | - | |
8323 | 8286 | | |
8324 | 8287 | | |
8325 | 8288 | | |
| |||
0 commit comments