Commit 3f243ff
Fix incorrect kvstore size and BIT accounting after completed migration (#2749)
When working on #2635 I errorneously duplicated the
setSlotImportingStateInAllDbs call for successful imports. This resulted
in us doubling the key count in the kvstore. This results in DBSIZE
reporting an incorrect sum, and also causes BIT corruption that can
eventually result in a crash.
The solution is:
1. Only call setSlotImportingStateInAllDbs once (in our
finishSlotMigrationJob function)
2. Make setSlotImportingStateInAllDbs idempotent by checking if the
delete from the kvstore importing hashtable is a no-op
This also fixes a bug where the number of importing keys is not lowered
after the migration, but this is less critical since it is only used
when resizing the dictionary on RDB load. However, it could result in
un-loadable RDBs if the importing key count gets large enough.
Signed-off-by: Jacob Murphy <[email protected]>
(cherry picked from commit 2a914aa)
Signed-off-by: cherukum-amazon <[email protected]>1 parent 937976c commit 3f243ff
File tree
3 files changed
+76
-5
lines changed- src
- tests/unit/cluster
3 files changed
+76
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
866 | 866 | | |
867 | 867 | | |
868 | 868 | | |
869 | | - | |
870 | | - | |
871 | | - | |
872 | 869 | | |
873 | 870 | | |
874 | 871 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
949 | 949 | | |
950 | 950 | | |
951 | 951 | | |
952 | | - | |
953 | 952 | | |
954 | 953 | | |
955 | | - | |
| 954 | + | |
956 | 955 | | |
| 956 | + | |
957 | 957 | | |
958 | 958 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
512 | 512 | | |
513 | 513 | | |
514 | 514 | | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
515 | 563 | | |
516 | 564 | | |
517 | 565 | | |
| |||
2006 | 2054 | | |
2007 | 2055 | | |
2008 | 2056 | | |
| 2057 | + | |
| 2058 | + | |
| 2059 | + | |
| 2060 | + | |
| 2061 | + | |
| 2062 | + | |
| 2063 | + | |
| 2064 | + | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
| 2068 | + | |
| 2069 | + | |
| 2070 | + | |
| 2071 | + | |
| 2072 | + | |
| 2073 | + | |
| 2074 | + | |
| 2075 | + | |
| 2076 | + | |
2009 | 2077 | | |
2010 | 2078 | | |
2011 | 2079 | | |
2012 | 2080 | | |
2013 | 2081 | | |
2014 | 2082 | | |
2015 | 2083 | | |
| 2084 | + | |
| 2085 | + | |
2016 | 2086 | | |
2017 | 2087 | | |
2018 | 2088 | | |
2019 | 2089 | | |
2020 | 2090 | | |
2021 | 2091 | | |
2022 | 2092 | | |
| 2093 | + | |
| 2094 | + | |
2023 | 2095 | | |
2024 | 2096 | | |
2025 | 2097 | | |
2026 | 2098 | | |
2027 | 2099 | | |
2028 | 2100 | | |
2029 | 2101 | | |
| 2102 | + | |
| 2103 | + | |
2030 | 2104 | | |
2031 | 2105 | | |
2032 | 2106 | | |
| |||
0 commit comments