kvrocks icon indicating copy to clipboard operation
kvrocks copied to clipboard

slot migrate not support json type

Open Genuineh opened this issue 1 year ago • 5 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

Version

v2.9.0

Minimal reproduce step

1、start slot migrate with json type data

What did you expect to see?

slot migrate work well on json data type

What did you see instead?

not working

Anything Else?

No response

Are you willing to submit a PR?

  • [ ] I'm willing to submit a PR!

Genuineh avatar Oct 06 '24 05:10 Genuineh

@Genuineh will support this at the next release.

git-hulk avatar Oct 08 '24 11:10 git-hulk

Thanks, #2580 seems can be completed together and when is the next release version expected to be launched? @git-hulk

Genuineh avatar Oct 08 '24 16:10 Genuineh

For slot migration, maybe you can try to set migrate-type to raw-key-value to make it work on any datatype.

https://github.com/apache/kvrocks/blob/f2c423348d7bb3b475d988559068ba8e2697d497/kvrocks.conf#L582

Although for kvrocks2redis we still need to do the supporting work.

PragmaTwice avatar Oct 08 '24 16:10 PragmaTwice

@PragmaTwice @git-hulk Thanks, slot migration work well on raw-key-value mode. By the way, the company I am in has a strong intention to use a database with a kv structure based on rocksdb to replace databases such as mongodb to store a large amount of business data. However, formal businesses often have various analysis or other needs, and these needs are usually handled by some specialized databases. At present, kvrocks may only temporarily provide migration to redis, which is not very friendly for those with such business needs. The current structure has a not-low learning cost for expansion. If the community needs to do a large amount of adaptation for different databases, it is a huge project. If a standard scheme that users can quickly expand can be provided, these tasks don't need to be done and users' different needs can be met. For a simple scheme, for example, it can directly connect to raw-key-value. Users only need to rewrite a writer and a checker.

Genuineh avatar Oct 09 '24 09:10 Genuineh

@Genuineh I got your point. It would be great to add a layer to separate the change event and from the target writer.

git-hulk avatar Oct 09 '24 13:10 git-hulk