-
Notifications
You must be signed in to change notification settings - Fork 76
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
redis-load is not adding the data to redis due to invalid ttl value #62
Comments
hello, Issue is due to this.
Non Working,
This is evident from this as well. So the issue is with pexpire. |
Could some expert comment on this? |
It sounds like this is the same issue as #60. |
just add an pull request to fix this issue #64. |
@hnimminh this works. |
Hello,
I am new to use this utility.
I am seeing an issue in which dump works well but load is not working or in other words redis set is not working.
My dump file looks as follows.
./redisdl.py --pretty > dump.json
{
"myKey": {
"expireat": 1565594482.6172411,
"ttl": -0.001,
"type": "string",
"value": "10"
},
"myhash": {
"expireat": 1565594482.61765,
"ttl": -0.001,
"type": "hash",
"value": {
"value": "key"
}
}
}
So while adding since ttl is -1 it is not able to set the data in redis.
./redisdl.py -l dump.json
This is due to this.
https://github.com/p/redis-dump-load/blob/master/redisdl.py#L490
r.pexpire_or_expire_pipeline(p, key, ttl)
If i comment the line then the data insertion is OK.
Basically what the function pexpire_or_expire_pipeline does is return p.pexpire(key, int(ttl * 1000)), so ttl is set to -1 and hence the key is expired.
So could someone tell me how to get around this issue?
Or do i need to pass something else during dump, i didnt see any in help text/code.
Same issue is seen even with --use-expireat as well.
Is this known issue or am i missing something?
The text was updated successfully, but these errors were encountered: