Repository navigation
Commit 0043f38
committed
fix: release the native UDF cache's read guard before taking the write lock
`get_or_load` looked up the canonical path in an `if let` scrutinee and took
the write lock inside its body to record the new path. The scrutinee's read
guard lives until the end of that block, so a first lookup through a path that
resolves to an already-loaded library, such as a symlink, waited on its own
read lock forever. Two threads racing on a library's first load through a
non-canonical path could reach the same branch.
The lookup is now a statement of its own. The new test looks a loaded library
up through a symlink on a separate thread, so a regression fails it after 30
seconds instead of hanging the run.1 parent ba22ecd commit 0043f38
1 file changed
Lines changed: 30 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
49 | 53 | | |
50 | 54 | | |
51 | 55 | | |
| |||
87 | 91 | | |
88 | 92 | | |
89 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
90 | 119 | | |
0 commit comments