- Notifications
You must be signed in to change notification settings - Fork4.9k
Commitffafacc
committed
Repair potential deadlock created by recent changes to recycle btree
index pages: when _bt_getbuf asks the FSM for a free index page, it ispossible (and, in some cases, even moderately likely) that the answerwill be the same page that _bt_split is trying to split. _bt_getbufalready knew that the returned page might not be free, but it wasn'tprepared for the possibility that even trying to lock the page couldbe problematic. Fix by doing a conditional rather than unconditionalgrab of the page lock.1 parent18c1087 commitffafacc
3 files changed
+67
-11
lines changedLines changed: 33 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
9 | 9 |
| |
10 | 10 |
| |
11 | 11 |
| |
12 |
| - | |
| 12 | + | |
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
| |||
409 | 409 |
| |
410 | 410 |
| |
411 | 411 |
| |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
412 | 428 |
| |
413 | 429 |
| |
414 | 430 |
| |
415 | 431 |
| |
416 | 432 |
| |
417 | 433 |
| |
418 | 434 |
| |
419 |
| - | |
420 |
| - | |
421 |
| - | |
| 435 | + | |
422 | 436 |
| |
423 |
| - | |
424 |
| - | |
425 |
| - | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
426 | 452 |
| |
427 |
| - | |
428 |
| - | |
429 | 453 |
| |
430 | 454 |
| |
431 | 455 |
| |
|
Lines changed: 32 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
1936 | 1936 |
| |
1937 | 1937 |
| |
1938 | 1938 |
| |
| 1939 | + | |
| 1940 | + | |
| 1941 | + | |
| 1942 | + | |
| 1943 | + | |
| 1944 | + | |
| 1945 | + | |
| 1946 | + | |
| 1947 | + | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
1939 | 1970 |
| |
1940 | 1971 |
| |
1941 | 1972 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
10 |
| - | |
| 10 | + | |
11 | 11 |
| |
12 | 12 |
| |
13 | 13 |
| |
| |||
180 | 180 |
| |
181 | 181 |
| |
182 | 182 |
| |
| 183 | + | |
183 | 184 |
| |
184 | 185 |
| |
185 | 186 |
| |
|
0 commit comments
Comments
(0)