Commit 58285a6
authored
Fix WAITAOF mix-use last_offset and last_numreplicas (#11922)
There be a situation that satisfies WAIT, and then wrongly unblock
WAITAOF because we mix-use last_offset and last_numreplicas.
We update last_offset and last_numreplicas only when the condition
matches. i.e. output of either replicationCountAOFAcksByOffset or
replicationCountAcksByOffset is right.
In this case, we need to have separate last_ variables for each of
them. Added a last_aof_offset and last_aof_numreplicas for WAITAOF.
WAITAOF was added in #11713. Found while coding #11917.
A Test was added to validate that case.1 parent 72f5aad commit 58285a6
3 files changed
+86
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3612 | 3612 | | |
3613 | 3613 | | |
3614 | 3614 | | |
| 3615 | + | |
3615 | 3616 | | |
| 3617 | + | |
3616 | 3618 | | |
3617 | 3619 | | |
3618 | 3620 | | |
| |||
3628 | 3630 | | |
3629 | 3631 | | |
3630 | 3632 | | |
3631 | | - | |
| 3633 | + | |
3632 | 3634 | | |
3633 | 3635 | | |
3634 | 3636 | | |
3635 | 3637 | | |
3636 | 3638 | | |
3637 | 3639 | | |
3638 | 3640 | | |
3639 | | - | |
| 3641 | + | |
3640 | 3642 | | |
3641 | 3643 | | |
3642 | 3644 | | |
| 3645 | + | |
| 3646 | + | |
| 3647 | + | |
| 3648 | + | |
3643 | 3649 | | |
3644 | 3650 | | |
3645 | 3651 | | |
| |||
3648 | 3654 | | |
3649 | 3655 | | |
3650 | 3656 | | |
3651 | | - | |
3652 | | - | |
| 3657 | + | |
| 3658 | + | |
| 3659 | + | |
| 3660 | + | |
| 3661 | + | |
| 3662 | + | |
| 3663 | + | |
3653 | 3664 | | |
3654 | 3665 | | |
3655 | 3666 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
| 1012 | + | |
1013 | 1013 | | |
1014 | 1014 | | |
1015 | 1015 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
360 | 360 | | |
361 | 361 | | |
362 | 362 | | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
0 commit comments