Skip to content

Recent commit breaks loading of previous RDB backups #318

Closed

Description

@awendel-presien

Hi everyone,

We discovered that the latest commits in master no longer support loading RDB backups from earlier commits, and get the following error:

8:M 21 Apr 2021 14:24:45.394 # The RDB file contains module AUX data, but the module 'ReJSON-RL' doesn't seem to support it.

The issue can be reproduced with the following procedure (tested using Redis 6.2.1):

  1. Enable RDB backups in redis.conf, using save 1 1 to ensure keys get backed up immediately.
  2. Run Redis with commit c205258 of RedisJSON.
  3. Set a key: redis-cli JSON.SET test . '{"foo": "bar", "ans": 42}'
  4. Stop Redis.
  5. Run Redis with the next commit, 6202520, of RedisJSON.

Redis will exit with the above error message.

Is there a way to make ReJSON compatible with earlier versions/commits?

Regards,
Alex.

Activity

  1. gkorland commented on Apr 22, 2021

    @gkorland
    Contributor

    @awendel-presien notice this Search support was removed from RedisJSON and moved to RediSearch.
    We can consider allowing loading old RDBs but notice you won't have the indexes loaded.

  2. self-assigned this
    on Apr 22, 2021
  3. gkorland commented on Apr 22, 2021

    @gkorland
    Contributor

    @awendel-presien can you please verify the PR to make sure it allows your RDB load

  4. awendel-presien commented on Apr 27, 2021

    @awendel-presien
    Author

    Thanks for looking at this so quickly, @gkorland. I repeated the test procedure from my original post, but at step 5 I used commit 0278ee9, which is the latest master commit and includes the PR you mention above. I now get the following error output:

    8:M 27 Apr 2021 06:02:14.615 # Internal error in RDB reading offset 0, function at rdb.c:2215 -> The RDB file contains module data for the module '' that is not terminated by the proper module value EOF marker
    [offset 0] Checking RDB file dump.rdb
    [offset 26] AUX FIELD redis-ver = '6.2.1'
    [offset 40] AUX FIELD redis-bits = '64'
    [offset 52] AUX FIELD ctime = '1619502704'
    [offset 67] AUX FIELD used-mem = '839504'
    [offset 83] AUX FIELD aof-preamble = '0'
    [offset 95] MODULE AUX for: ReJSON-RL
    [offset 100] Selecting DB ID 0
    [offset 154] Checksum OK
    [offset 154] \o/ RDB looks OK! \o/
    [info] 1 keys read
    [info] 0 expires
    [info] 0 already expired
    

    Can you reopen the issue, or should I create a new one for this error?

    Thanks again for your help so far.

    Cheers,
    Alex.

  5. gkorland commented on Apr 27, 2021

    @gkorland
    Contributor

    @awendel-presien are you sure this is the same file you shared with me before? From the error it seems like the file broken.

  6. awendel-presien commented on Apr 27, 2021

    @awendel-presien
    Author

    @gkorland I produced the file the same way I had in the procedure I posted originally (steps 1-3). Just to be sure I repeated the procedure again and I get the same result as in in my last post (using commit 0278ee9 for step 5).

    Cheers,
    Alex.

  7. awendel-presien commented on Apr 28, 2021

    @awendel-presien
    Author

    @gkorland Would it be better for me to create a new issue for this, or are you able to reopen it?

  8. added a commit that references this issue on Apr 29, 2021
    8b53b62
  9. gkorland commented on Apr 29, 2021

    @gkorland
    Contributor

    @awendel-presien sorry for the former broken fix please try #333

  10. added a commit that references this issue on May 2, 2021
    9d0aba5
  11. added a commit that references this issue on May 5, 2021
    93e471f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions