Commit e8383df
committed
Fix NamespaceLock context variable timing to prevent lock bricking
* Acquire lock before setting ContextVar
* Prevent state corruption on cancellation
* Fix permanent lock brick scenario
* Store context only after success
* Handle acquisition failure properly1 parent 95e1fb1 commit e8383df
File tree
1 file changed
+5
-2
lines changed- lightrag/kg
1 file changed
+5
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1514 | 1514 | | |
1515 | 1515 | | |
1516 | 1516 | | |
1517 | | - | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
1518 | 1521 | | |
1519 | | - | |
| 1522 | + | |
1520 | 1523 | | |
1521 | 1524 | | |
1522 | 1525 | | |
| |||
0 commit comments