Commit dff3614
committed
Fix shared lock rejection bug in do_LOCK
Removed blanket rejection of lock requests on already-locked resources.
The do_LOCK method was returning 423 for all new lock requests on
locked resources without checking lock compatibility. This prevented
multiple shared locks from being acquired.
The fix delegates compatibility checking to _lock_unlock_create(),
which already has logic to validate exclusive vs shared lock conflicts.
Changes:
- locks.py: Removed lines 157-160 that returned 423 for all lock
requests on locked resources
- locks.py: Added try/catch around _lock_unlock_create() to handle
incompatible lock exceptions
Test results:
- double_sharedlock (test 27): now passing
- Locks test suite: improved from 32/37 to 33/37 (89.2%)
Remaining failures (tests 32-34) are related to collection locking,
which the code explicitly notes is not yet supported (locks.py:85-87).1 parent dd687a0 commit dff3614
1 file changed
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
| 157 | + | |
163 | 158 | | |
164 | 159 | | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
| |||
0 commit comments