helper function to change the victim, according to the weight */
| 669 | helper function to change the victim, according to the weight |
| 670 | */ |
| 671 | static void change_victim(WT_THD* found, struct deadlock_arg *arg) |
| 672 | { |
| 673 | if (found->weight < arg->victim->weight) |
| 674 | { |
| 675 | if (arg->victim != arg->thd) |
| 676 | { |
| 677 | rc_unlock(arg->victim->waiting_for); /* release the previous victim */ |
| 678 | DBUG_ASSERT(arg->last_locked_rc == found->waiting_for); |
| 679 | } |
| 680 | arg->victim= found; |
| 681 | arg->last_locked_rc= 0; |
| 682 | } |
| 683 | } |
| 684 | |
| 685 | /** |
| 686 | recursive loop detection in a wait-for graph with a limited search depth |
no test coverage detected