Skip to content

Releases: redisx-pro/RedisXSlot

v0.1.0

08 Sep 10:27
Compare
Choose a tag to compare

Feature

  1. load module init hash slot size, default size 2^10, max size 2^16. (once make sure the slot size, don't change it)
  2. load module init activerehashing,databases from config, activerehashing used to sub server event to rehash slot keys dict
  3. load module init num_threads, if thread_num>0,init thread pool size to do migrate job, default donot use thread pool.
  4. sub ServerEvent CronLoop(ServerLoop),FlushDB,Shutdown
    1. sub CronLoop server event hook to resize/rehash dict (db slot keys tables)
    2. sub FlushDB server event hook to delete one/all dict (db slot keys tables)
    3. sub Shutdown server event hook to release dicts (db slot keys tables) and free memory.
  5. sub KeyspaceEvents STRING,LIST,HASH,SET,ZSET, LOADED; GENERIC, EXPIRED
    1. sub keyspaces STRING,LIST,HASH,SET,ZSET, LOADED notify event hook to add dict/skiplist keys
    2. sub keyspaces GENERIC, EXPIRED notify event hook to delete dict/skiplist keys
  6. support slot tag key migrate, for (smart client/proxy)'s configSrv admin contoller layer use it.
    use SLOTSMGRTTAGSLOT cmd to migrate slot's key with same tag,
    default use slotsrestore batch send key, ttlms, dump rdb val ... (restore with replace)
  7. SLOTSRESTORE if num_threads>0, init thread pool size to send slotsrestore batch keys job. loadmodule like this ./redis/src/redis-server --port 6379 --loadmodule ./redisxslot.so 1024 4 --dbfilename dump.6379.rdb
  8. about migrate cmd, create a thread async block todo per client, splite batch migrate, don't or less block other cmd run. loadmodule like this ./redis/src/redis-server --port 6379 --loadmodule ./redisxslot.so 1024 4 async --dbfilename dump.6379.rdb
  9. support setcpuaffinity for migrate async thread like redis bio job thread config setcpuaffinity on linux/bsd(syntax of cpu list looks like taskset). loadmodule like this ./redis/src/redis-server --port 6379 --loadmodule ./redisxslot.so 1024 0 async 1,3 --dbfilename dump.6379.rdb
  10. about migrate cmd, support pipeline buffer migrate, use migrate cmd like this SLOTSMGRTTAGSLOT 127.0.0.1 6379 30000 835 withpipeline. use withpipeline current don't support thread pool and async block migrate.