Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
38823f08
Commit
38823f08
authored
Jan 05, 2010
by
antirez
Browse files
fixed a bug in bgsave when VM is off but still it was testing for obj->storage field
parent
f2b8ab34
Changes
1
Show whitespace changes
Inline
Side-by-side
redis.c
View file @
38823f08
...
@@ -2888,7 +2888,7 @@ static int rdbSave(char *filename) {
...
@@ -2888,7 +2888,7 @@ static int rdbSave(char *filename) {
}
}
/* Save the key and associated value. This requires special
/* Save the key and associated value. This requires special
* handling if the value is swapped out. */
* handling if the value is swapped out. */
if (key->storage == REDIS_VM_MEMORY) {
if (
!server.vm_enabled ||
key->storage == REDIS_VM_MEMORY) {
/* Save type, key, value */
/* Save type, key, value */
if (rdbSaveType(fp,o->type) == -1) goto werr;
if (rdbSaveType(fp,o->type) == -1) goto werr;
if (rdbSaveStringObject(fp,key) == -1) goto werr;
if (rdbSaveStringObject(fp,key) == -1) goto werr;
...
@@ -6532,7 +6532,7 @@ static int rewriteAppendOnlyFile(char *filename) {
...
@@ -6532,7 +6532,7 @@ static int rewriteAppendOnlyFile(char *filename) {
int swapped;
int swapped;
key = dictGetEntryKey(de);
key = dictGetEntryKey(de);
if (key->storage == REDIS_VM_MEMORY) {
if (
!server.vm_enabled ||
key->storage == REDIS_VM_MEMORY) {
o = dictGetEntryVal(de);
o = dictGetEntryVal(de);
swapped = 0;
swapped = 0;
} else {
} else {
...
@@ -6889,7 +6889,7 @@ static int vmSwapObject(robj *key, robj *val) {
...
@@ -6889,7 +6889,7 @@ static int vmSwapObject(robj *key, robj *val) {
static robj *vmGenericLoadObject(robj *key, int preview) {
static robj *vmGenericLoadObject(robj *key, int preview) {
robj *val;
robj *val;
a
ssert(key->storage == REDIS_VM_SWAPPED);
redisA
ssert(key->storage == REDIS_VM_SWAPPED);
if (fseeko(server.vm_fp,key->vm.page*server.vm_page_size,SEEK_SET) == -1) {
if (fseeko(server.vm_fp,key->vm.page*server.vm_page_size,SEEK_SET) == -1) {
redisLog(REDIS_WARNING,
redisLog(REDIS_WARNING,
"Unrecoverable VM problem in vmLoadObject(): can't seek: %s",
"Unrecoverable VM problem in vmLoadObject(): can't seek: %s",
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment