Commit 6ad4cfb
committed
Add slot migration client flags and module context flags (valkey-io#2639)
New client flags in reported by CLIENT INFO and CLIENT LIST:
* `i` for atomic slot migration importing client
* `E` for atomic slot migration exporting client
New flags in return value of `ValkeyModule_GetContextFlags`:
* `VALKEYMODULE_CTX_FLAGS_SLOT_IMPORT_CLIENT`: Indicate the that client
attached to this context is the slot import client.
* `VALKEYMODULE_CTX_FLAGS_SLOT_EXPORT_CLIENT`: Indicate the that client
attached to this context is the slot export client.
Users could use this to monitor the underlying client info of the slot
migration, and more clearly understand why they see extra clients during
the migration.
Modules can use these to detect keyspace notifications on import
clients. I am also adding export flags for symmetry, although there
should not be keyspace notifications. But they would potentially be
visible in command filters or in server events triggered by that client.
---------
Signed-off-by: Jacob Murphy <[email protected]>1 parent 47c7c8e commit 6ad4cfb
File tree
4 files changed
+76
-2
lines changed- src
- tests/unit/cluster
4 files changed
+76
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4004 | 4004 | | |
4005 | 4005 | | |
4006 | 4006 | | |
| 4007 | + | |
| 4008 | + | |
| 4009 | + | |
| 4010 | + | |
| 4011 | + | |
| 4012 | + | |
4007 | 4013 | | |
4008 | 4014 | | |
4009 | 4015 | | |
| |||
4017 | 4023 | | |
4018 | 4024 | | |
4019 | 4025 | | |
| 4026 | + | |
| 4027 | + | |
| 4028 | + | |
| 4029 | + | |
| 4030 | + | |
4020 | 4031 | | |
4021 | 4032 | | |
4022 | 4033 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4212 | 4212 | | |
4213 | 4213 | | |
4214 | 4214 | | |
| 4215 | + | |
| 4216 | + | |
4215 | 4217 | | |
4216 | 4218 | | |
4217 | 4219 | | |
| |||
4696 | 4698 | | |
4697 | 4699 | | |
4698 | 4700 | | |
| 4701 | + | |
| 4702 | + | |
4699 | 4703 | | |
4700 | 4704 | | |
4701 | 4705 | | |
| |||
4850 | 4854 | | |
4851 | 4855 | | |
4852 | 4856 | | |
| 4857 | + | |
| 4858 | + | |
| 4859 | + | |
| 4860 | + | |
| 4861 | + | |
| 4862 | + | |
4853 | 4863 | | |
4854 | 4864 | | |
4855 | 4865 | | |
| |||
4858 | 4868 | | |
4859 | 4869 | | |
4860 | 4870 | | |
4861 | | - | |
| 4871 | + | |
4862 | 4872 | | |
4863 | 4873 | | |
4864 | 4874 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
227 | 231 | | |
228 | | - | |
| 232 | + | |
229 | 233 | | |
230 | 234 | | |
231 | 235 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
521 | 521 | | |
522 | 522 | | |
523 | 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 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
524 | 573 | | |
525 | 574 | | |
526 | 575 | | |
| |||
0 commit comments