- Notifications
You must be signed in to change notification settings - Fork5
Commit4aec498
committed
Assorted code review for recent ProcArrayLock patch.
Post-commit review by Andres Freund discovered a couple of concurrencybugs in the original patch: specifically, if the leader cleared afollower's XID before it reached PGSemaphoreLock, the semaphore would beleft in the wrong state; and if another process did PGSemaphoreUnlockfor some unrelated reason, we might resume execution before the factthat our XID was cleared was globally visible.Also, improve the wording of some comments, rename nextClearXidElemto firstClearXidElem in PROC_HDR for clarity, and drop some volatilequalifiers that aren't necessary.Amit Kapila, reviewed and slightly revised by me.1 parent1ea5ce5 commit4aec498
File tree
3 files changed
+34
-15
lines changed- src
- backend/storage
- ipc
- lmgr
- include/storage
3 files changed
+34
-15
lines changedLines changed: 29 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
470 | 470 |
| |
471 | 471 |
| |
472 | 472 |
| |
473 |
| - | |
474 |
| - | |
475 |
| - | |
476 |
| - | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
477 | 477 |
| |
478 | 478 |
| |
479 | 479 |
| |
| |||
487 | 487 |
| |
488 | 488 |
| |
489 | 489 |
| |
| 490 | + | |
490 | 491 |
| |
491 | 492 |
| |
492 | 493 |
| |
493 |
| - | |
| 494 | + | |
494 | 495 |
| |
495 | 496 |
| |
496 |
| - | |
| 497 | + | |
497 | 498 |
| |
498 | 499 |
| |
499 | 500 |
| |
500 | 501 |
| |
501 | 502 |
| |
502 |
| - | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
503 | 509 |
| |
504 | 510 |
| |
505 | 511 |
| |
506 |
| - | |
| 512 | + | |
507 | 513 |
| |
508 |
| - | |
| 514 | + | |
509 | 515 |
| |
| 516 | + | |
| 517 | + | |
| 518 | + | |
510 | 519 |
| |
511 | 520 |
| |
| 521 | + | |
| 522 | + | |
512 | 523 |
| |
513 | 524 |
| |
514 | 525 |
| |
| |||
520 | 531 |
| |
521 | 532 |
| |
522 | 533 |
| |
523 |
| - | |
| 534 | + | |
| 535 | + | |
524 | 536 |
| |
525 | 537 |
| |
526 | 538 |
| |
527 |
| - | |
528 |
| - | |
| 539 | + | |
| 540 | + | |
529 | 541 |
| |
530 | 542 |
| |
531 | 543 |
| |
| |||
563 | 575 |
| |
564 | 576 |
| |
565 | 577 |
| |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
566 | 583 |
| |
567 | 584 |
| |
568 | 585 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
181 | 181 |
| |
182 | 182 |
| |
183 | 183 |
| |
184 |
| - | |
| 184 | + | |
185 | 185 |
| |
186 | 186 |
| |
187 | 187 |
| |
| |||
395 | 395 |
| |
396 | 396 |
| |
397 | 397 |
| |
| 398 | + | |
398 | 399 |
| |
399 | 400 |
| |
400 | 401 |
| |
|
Lines changed: 3 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
142 | 142 |
| |
143 | 143 |
| |
144 | 144 |
| |
145 |
| - | |
| 145 | + | |
| 146 | + | |
146 | 147 |
| |
147 | 148 |
| |
148 | 149 |
| |
| |||
207 | 208 |
| |
208 | 209 |
| |
209 | 210 |
| |
210 |
| - | |
| 211 | + | |
211 | 212 |
| |
212 | 213 |
| |
213 | 214 |
| |
|
0 commit comments
Comments
(0)