Before this PR we used RESTORE commands for transferring data between source and target nodes in cluster slots migration.
While this works, it has a side effect of consuming 2x memory for huge values (i.e. if a single key's value takes 10gb, serializing it will take 20gb or even 30gb).
With this PR we break down huge keys into multiple commands (RPUSH, HSET, etc), respecting the existing --serialization_max_chunk_size flag.
Note that we still use RESTORE serialization for small values and for some data types which are not (yet?) supported.
Before this PR we used
RESTORE
commands for transferring data between source and target nodes in cluster slots migration.While this works, it has a side effect of consuming 2x memory for huge values (i.e. if a single key's value takes 10gb, serializing it will take 20gb or even 30gb).
With this PR we break down huge keys into multiple commands (
RPUSH
,HSET
, etc), respecting the existing--serialization_max_chunk_size
flag.Note that we still use
RESTORE
serialization for small values and for some data types which are not (yet?) supported.Part of #4100