Repository navigation
Conversation
A Valkey 9 cluster primary that is importing a slot (atomic slot migration) writes RDB_OPCODE_SLOT_IMPORT (243) into its RDB. A full sync from such a primary fails with "unexpected value type:243". * SlotImportTest parses dump-slot-import.rdb, an RDB saved by Valkey 9.0.3 in the middle of a slot import, with the default and skip visitors. * SlotMigrationTest runs a full sync against a real 2-node cluster with the import held open, then cancels the migration and expects the imported key's deletion in the replication stream. * valkey-cluster.sh starts the cluster for local runs and CI (`.github/scripts/valkey-cluster.sh test`), and docker-tests.yml gets a valkey-cluster job that runs it. Both tests fail until the opcode is handled.
Parse RDB_OPCODE_SLOT_IMPORT (243) so a full sync from a Valkey 9 cluster primary in the middle of an atomic slot migration no longer fails with "unexpected value type:243". The slot import state is server-internal, so DefaultRdbVisitor skips it with SkipRdbParser and emits no event. SkipRdbVisitor inherits it. Redis 8.6+ writes 243 as RDB_OPCODE_KEY_META with a different layout, so the opcode is handled only under Flavor.VALKEY. For Redis it still falls through to the existing error.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Valkey 9 cluster primary that is importing a slot (atomic slot migration) writes
RDB_OPCODE_SLOT_IMPORT(243) into its RDB. A full sync from that primary currently fails withunexpected value type:243.Changes
RdbParser: handle opcode 243 asapplySlotImport, but only underFlavor.VALKEY.How it was tested
SlotImportTest: parsesdump-slot-import.rdb, a real RDB saved by Valkey 9.0.3 mid-import, with the default and skip visitors. It also checks that 243 is still rejected for the Redis flavor.SlotMigrationTest: runs a full sync against a real 2-node Valkey cluster while the import is held open. Then it cancels the migration and checks that the imported key's deletion arrives in the replication stream.valkey-clusterindocker-tests.yml. Locally you can run the same thing with:.github/scripts/valkey-cluster.sh testThe first commit adds only the tests, so you can see them fail before the fix.