Commit a726b71
authored
feat(nns): Split the active_neurons_in_stable_memory into 2 flags (#3312)
# Why
The previous set up for the feature flag
`active_neurons_in_stable_memory` does not allow us to safely rollback
if necessary, because the rolled back version would only look for active
neurons in the heap memory, while some would still be in the stable
memory until the timer picks them up (if the reverse migration is
implemented).
# What
Use `allow_active_neurons_in_stable_memory` for whether the canister
allows active neurons to be in stable memory, by checking stable memory
when iterating/finding active neurons.
Use `migrate_active_neurons_to_stable_memory` for whether the active
neurons should be in stable memory, so that the migration task in the
timer would move them accordingly.
## Launch/Rollback Plan
With the new setup, we can:
1. Turn on `allow_active_neurons_in_stable_memory`. If any problems
occur, we can roll it back.
2. If there is no problem found, we can turn on
`migrate_active_neurons_to_stable_memory`. If any problems occur, we can
roll back `migrate_active_neurons_to_stable_memory` and a later PR
(which should be merged before launching) will do the reverse migration.
We cannot rollback the 2 flags simultaneously (refer to the "Why"
section above).
3. If we have to rollback `allow_active_neurons_in_stable_memory` at
this point (however unlikely), we can rollback
`migrate_active_neurons_to_stable_memory` first, and do another release
to rollback `allow_active_neurons_in_stable_memory` after we confirm
that the reverse migration has been completed.1 parent 983a053 commit a726b71
File tree
7 files changed
+126
-64
lines changed- rs/nns/governance/src
- governance
- neuron_store
7 files changed
+126
-64
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
| 11 | + | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
| 14 | + | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
| |||
392 | 394 | | |
393 | 395 | | |
394 | 396 | | |
395 | | - | |
| 397 | + | |
396 | 398 | | |
| 399 | + | |
397 | 400 | | |
398 | 401 | | |
399 | 402 | | |
| |||
406 | 409 | | |
407 | 410 | | |
408 | 411 | | |
409 | | - | |
| 412 | + | |
410 | 413 | | |
| 414 | + | |
411 | 415 | | |
412 | 416 | | |
413 | 417 | | |
| |||
420 | 424 | | |
421 | 425 | | |
422 | 426 | | |
423 | | - | |
| 427 | + | |
424 | 428 | | |
| 429 | + | |
425 | 430 | | |
426 | 431 | | |
427 | 432 | | |
| |||
434 | 439 | | |
435 | 440 | | |
436 | 441 | | |
437 | | - | |
| 442 | + | |
438 | 443 | | |
| 444 | + | |
439 | 445 | | |
440 | 446 | | |
441 | 447 | | |
| |||
448 | 454 | | |
449 | 455 | | |
450 | 456 | | |
451 | | - | |
| 457 | + | |
452 | 458 | | |
| 459 | + | |
453 | 460 | | |
454 | 461 | | |
455 | 462 | | |
| |||
459 | 466 | | |
460 | 467 | | |
461 | 468 | | |
462 | | - | |
| 469 | + | |
463 | 470 | | |
| 471 | + | |
464 | 472 | | |
465 | 473 | | |
466 | 474 | | |
| |||
472 | 480 | | |
473 | 481 | | |
474 | 482 | | |
475 | | - | |
| 483 | + | |
| 484 | + | |
476 | 485 | | |
477 | 486 | | |
478 | 487 | | |
| |||
558 | 567 | | |
559 | 568 | | |
560 | 569 | | |
561 | | - | |
| 570 | + | |
| 571 | + | |
562 | 572 | | |
563 | 573 | | |
564 | 574 | | |
565 | 575 | | |
566 | 576 | | |
567 | 577 | | |
568 | | - | |
| 578 | + | |
| 579 | + | |
569 | 580 | | |
570 | 581 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
209 | 209 | | |
210 | 210 | | |
211 | 211 | | |
212 | | - | |
| 212 | + | |
213 | 213 | | |
214 | 214 | | |
| 215 | + | |
| 216 | + | |
215 | 217 | | |
216 | 218 | | |
217 | 219 | | |
| |||
285 | 287 | | |
286 | 288 | | |
287 | 289 | | |
288 | | - | |
289 | | - | |
| 290 | + | |
| 291 | + | |
290 | 292 | | |
291 | 293 | | |
292 | 294 | | |
293 | 295 | | |
294 | | - | |
295 | | - | |
| 296 | + | |
| 297 | + | |
296 | 298 | | |
297 | 299 | | |
298 | 300 | | |
299 | 301 | | |
300 | | - | |
301 | | - | |
| 302 | + | |
| 303 | + | |
302 | 304 | | |
303 | 305 | | |
304 | 306 | | |
| |||
317 | 319 | | |
318 | 320 | | |
319 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
320 | 338 | | |
321 | 339 | | |
322 | 340 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
225 | 225 | | |
226 | 226 | | |
227 | 227 | | |
228 | | - | |
| 228 | + | |
229 | 229 | | |
230 | 230 | | |
231 | 231 | | |
| |||
688 | 688 | | |
689 | 689 | | |
690 | 690 | | |
691 | | - | |
| 691 | + | |
692 | 692 | | |
693 | 693 | | |
694 | 694 | | |
| |||
996 | 996 | | |
997 | 997 | | |
998 | 998 | | |
999 | | - | |
| 999 | + | |
1000 | 1000 | | |
1001 | 1001 | | |
1002 | 1002 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
| 2 | + | |
2 | 3 | | |
3 | 4 | | |
4 | 5 | | |
5 | | - | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | | - | |
323 | | - | |
324 | | - | |
325 | | - | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
326 | 331 | | |
327 | 332 | | |
328 | 333 | | |
| |||
338 | 343 | | |
339 | 344 | | |
340 | 345 | | |
341 | | - | |
| 346 | + | |
342 | 347 | | |
| 348 | + | |
343 | 349 | | |
344 | 350 | | |
345 | 351 | | |
| |||
352 | 358 | | |
353 | 359 | | |
354 | 360 | | |
355 | | - | |
| 361 | + | |
356 | 362 | | |
| 363 | + | |
357 | 364 | | |
358 | 365 | | |
359 | 366 | | |
| |||
368 | 375 | | |
369 | 376 | | |
370 | 377 | | |
371 | | - | |
| 378 | + | |
372 | 379 | | |
| 380 | + | |
373 | 381 | | |
374 | 382 | | |
375 | 383 | | |
| |||
400 | 408 | | |
401 | 409 | | |
402 | 410 | | |
403 | | - | |
| 411 | + | |
404 | 412 | | |
| 413 | + | |
405 | 414 | | |
406 | 415 | | |
407 | 416 | | |
| |||
515 | 524 | | |
516 | 525 | | |
517 | 526 | | |
518 | | - | |
| 527 | + | |
519 | 528 | | |
520 | 529 | | |
521 | 530 | | |
| |||
851 | 860 | | |
852 | 861 | | |
853 | 862 | | |
854 | | - | |
| 863 | + | |
855 | 864 | | |
856 | 865 | | |
857 | 866 | | |
| |||
1218 | 1227 | | |
1219 | 1228 | | |
1220 | 1229 | | |
1221 | | - | |
| 1230 | + | |
1222 | 1231 | | |
1223 | 1232 | | |
1224 | | - | |
| 1233 | + | |
1225 | 1234 | | |
1226 | 1235 | | |
1227 | 1236 | | |
| |||
1342 | 1351 | | |
1343 | 1352 | | |
1344 | 1353 | | |
1345 | | - | |
| 1354 | + | |
1346 | 1355 | | |
1347 | 1356 | | |
1348 | 1357 | | |
| |||
0 commit comments