-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RDB compatibility with ReJSON #19
Comments
…y test Signed-off-by: Joe Hu <[email protected]>
…y test Signed-off-by: Joe Hu <[email protected]>
…y test Signed-off-by: Joe Hu <[email protected]>
I think we should just remove all aux type code not related to the JSON module, because when we talk about RDB compatibility, it is under the condition that no other module types are present. In addition, earlier releases of rejson docker images used to include search module, but newer rejson docker images no longer does that. Appendix - Testing RDB compatibility with various releases of ReJSON docker imagesThe following is a test to explain why we need to load search aux types:
Although it's a rejson image, it contains search module as well:
That's because code for loading aux type ft_index0 is missing. Note that although we have not created any search index, Redis still writes search aux types to RDB. I think the problem comes from RediSearch. It must have used aux_save instead of aux_save2. For aux_save, even if there is no module data (search index in this case), it writes aux type meta data to RDB. The correct way is to use aux_save2, which will not write module types if there is no module data. The fix should come from RediSearch. We can open an issue for them. If they fix the problem, then we do not need to load search aux types. I just realized some of the rejson RDB test files, included in this PR, were generated using However, there's still a question regarding search aux types. If we want to help migrating ReJSON to VakeyJSON, do we need to load aux search types? I believe there are two search aux types - scdtype00 and ft_index00. Some ReJSON docker images contain RediSearch and some do not. e.g.,
For RDBs generated from docker images that do not contain RediSearch, we do not need to load search aux types. However, for RDBs generated from docker images that contain RediSearch, we need to load the search aux types. |
Signed-off-by: Joe Hu <[email protected]>
Found a bug that RDB compatibility with ReJSON is broken. The root cause is that some ReJSON aux type processing code were missed out in the initial PR. The bug was not caught in the integration test because the RDB compatibility test is missing. So, we should fix the test gap as well.
Also discovered that we are only RDB compatible with ReJSON up to ReJSON v2.6.12. ReJSON has changed RDB format since v2.8. Created a separate issue: #20.
The text was updated successfully, but these errors were encountered: