From d6d3f92fb0b9886e500731111af7d7bd795f7d32 Mon Sep 17 00:00:00 2001 From: antirez Date: Thu, 20 May 2010 12:03:02 +0200 Subject: [PATCH] added regression for zipmap bug --- TODO | 1 + tests/unit/type/hash.tcl | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/TODO b/TODO index 7a9b7074..d02e260c 100644 --- a/TODO +++ b/TODO @@ -9,6 +9,7 @@ VERSION 2.2 TODO (Optimizations and latency) * Specially encoded Sets (like Hashes). * Implement an UDP interface for low-latency operations. * What about a special coding that is about storing the "rdb" serialized format instead of the actual value? This can be used when we have LRU in order to super-compress data into memory, for data not accessed frequetly. It's a VM-alike strategy but fully in memory, may reduce the space to hold some dataset in an impressive way. Trivial to implement. +* Another idea: LRU does not need to be super precise right? Maybe it's a good idea to just put into the skiplist implementing the LRU just the pointer to the key without evne incr/decr business, nor the need to remove the pointer when the key is deleted. There is to think more about that. VERSION 2.x TODO ================ diff --git a/tests/unit/type/hash.tcl b/tests/unit/type/hash.tcl index 3fdc05e0..0d08cc55 100644 --- a/tests/unit/type/hash.tcl +++ b/tests/unit/type/hash.tcl @@ -286,4 +286,10 @@ start_server default.conf {} { lappend rv [string match "ERR*not an integer*" $smallerr] lappend rv [string match "ERR*not an integer*" $bigerr] } {1 1} + + test {Hash zipmap regression test for large keys} { + r hset hash kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk a + r hset hash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