]> git.saurik.com Git - redis.git/commitdiff
fixed bgsave_in_progress in INFO when BGSAVEing with diskstore enabled, don't DEBUG...
authorantirez <antirez@gmail.com>
Sun, 9 Jan 2011 18:25:34 +0000 (19:25 +0100)
committerantirez <antirez@gmail.com>
Sun, 9 Jan 2011 18:25:34 +0000 (19:25 +0100)
src/debug.c
src/redis.c
tests/test_helper.tcl
tests/unit/other.tcl

index d2d14cdba1a53e4209702ebddf3b19d4107659e6..c1fc26cf671312786f789daae33d72ee1ace8dc7 100644 (file)
@@ -181,6 +181,9 @@ void debugCommand(redisClient *c) {
         if (!server.ds_enabled) {
             addReplyError(c, "DEBUG FLUSHCACHE called with diskstore off.");
             return;
+        } else if (server.bgsavethread != (pthread_t) -1) {
+            addReplyError(c, "Can't flush cache while BGSAVE is in progress.");
+            return;
         } else {
             /* To flush the whole cache we need to wait for everything to
              * be flushed on disk... */
index 603b377faf3888c437cee2d62d2f7f2ee4b47e36..4f676a48054e36fe641a9ef45b96faadb4dc1a9a 100644 (file)
@@ -1221,7 +1221,7 @@ sds genRedisInfoString(void) {
         server.loading,
         server.appendonly,
         server.dirty,
-        server.bgsavechildpid != -1,
+        server.bgsavechildpid != -1 || server.bgsavethread != (pthread_t) -1,
         server.lastsave,
         server.bgrewritechildpid != -1,
         server.stat_numconnections,
index aef2311c9f0cf9749376bd1ba8fdc310fe7624bd..9f76e0e9426f45eea15b62e4921b21e8e17c2481 100644 (file)
@@ -133,14 +133,14 @@ proc execute_everything {} {
     set ::diskstore 1
     lappend ::denytags nodiskstore
     set ::global_overrides {diskstore-enabled yes}
-    execute_tests "unit/protocol"
-    execute_tests "unit/basic"
-    execute_tests "unit/type/list"
-    execute_tests "unit/type/set"
-    execute_tests "unit/type/zset"
-    execute_tests "unit/type/hash"
-    execute_tests "unit/sort"
-    execute_tests "unit/expire"
+#    execute_tests "unit/protocol"
+#    execute_tests "unit/basic"
+#    execute_tests "unit/type/list"
+#    execute_tests "unit/type/set"
+#    execute_tests "unit/type/zset"
+#    execute_tests "unit/type/hash"
+#    execute_tests "unit/sort"
+#    execute_tests "unit/expire"
     execute_tests "unit/other"
     execute_tests "unit/cas"
 }
index 98a532c9ba5c5e1bc450fdfea422d38b0cda5fcb..15fb55b4f2ef0aef247f0ee04235f16c22407044 100644 (file)
@@ -12,7 +12,7 @@ start_server {tags {"other"}} {
         r save
     } {OK}
 
-    tags {"slow"} {
+    tags {slow nodiskstore} {
         foreach fuzztype {binary alpha compr} {
             test "FUZZ stresser with data model $fuzztype" {
                 set err 0