Releases: apache/kvrocks
2.4.0
Note: In this release, we have upgraded RocksDB to version 8.1.1. In addition, we have introduced a new storage encoding format that can accommodate 64-bit element count and expiration time in milliseconds. To enable this feature, you must include -DENABLE_NEW_ENCODING=ON
during the build process (which is not enabled by default). Once the new encoding is enabled, data stored using the old encoding will remain accessible for reading and writing as usual. However, any new data will be written using the new encoding format.
New Features
- Use the RocksDB WriteBatchWithIndex to implement the read-your-own-writes in transaction by @git-hulk in #1287
- Support watch/unwatch commands by @PragmaTwice in #1279
- Support replica-announce-ip and replica-announce-port by @paragor in #1303
- Implement the new encoding with 64bit size and expire time in milliseconds by @PragmaTwice in #1342
- Allow to configure the compaction checker policy by @ellutionist in #1325
- Add max background jobs to configuration by @bruceqiwang in #1374
- Add TIME command as Redis by @enjoy-binbin in #1394
Improvements
- Add optional args to XLEN to specify start ID and direction by @torwig in #1251
- Add more version detail in server info by @PragmaTwice in #1253
- Show version and commit hash in a more pretty way by @PragmaTwice in #1252
- Remove some new-delete patterns and refine LockManager hash function by @PragmaTwice in #1268
- Add explicit fallthrough in the replication state transmission by @guoxiangCN in #1293
- Add move assign and reset for ObserverOrUnique by @PragmaTwice in #1299
- Add CreateThread to avoid manual try-catch by @PragmaTwice in #1302
- Allow HSETNX to receive multiple field-value pairs like HSET by @torwig in #1310
- Use std::shared_mutex instead of our own ReadWriteLock implementation by @PragmaTwice in #1314
- Refactor task runner for more robust runtime state by @PragmaTwice in #1318
- Minor refactoring of src/common, src/server by @torwig in #1280
- Improve code style and do some minor fix in scripting by @PragmaTwice in #1312
- Refactor eval commands by @PragmaTwice in #1313
- Use inline to replace extern global constants by @PragmaTwice in #1316
- Minor refactoring of stc/storage/storage.cc by @torwig in #1321
- Remove useless buf and prealloc in InternalKey by @PragmaTwice in #1245
- Replace list with other cache-friendly containers by @PragmaTwice in #1322
- Introduce TBB to refactor task runners by @PragmaTwice in #1323
- Check if the checkpoint seq is in the WAL boundary before using by @git-hulk in #1320
- Round expire time for seconds to improve precision for 32bit-common-field encoding by @PragmaTwice in #1352
- Unify time retrieving and remove srand call in metadata construction by @PragmaTwice in #1351
- Add CLIENT INFO command as Redis by @enjoy-binbin in #1354
- Make the create-cluster script robustness by @xiaobiaozhao in #1356
- Rewrite encoding functions by @PragmaTwice in #1358
- Rewrite popcount and bitpos in redis bitmap by @PragmaTwice in #1359
- Remove manual code concat in scripting by @PragmaTwice in #1362
- Systemd service file update by @aleksraiden in #1360
- Use more efficient popcount in Redis::Bitmap by @PragmaTwice in #1363
- Introduce JSONCONS for RedisJSON and rewrite Server::GetRocksDBStatsJson by @PragmaTwice in #1366
- Refactor Status to avoid large stack size in happy path by @PragmaTwice in #1368
- Minor refactoring of slot migration source code by @torwig in #1373
- Add MEMORY USAGE command as an alias to existing DISK USAGE command by @torwig in #1375
- Add SUBSTR command as redis by @enjoy-binbin in #1347
- Add cluster section into the info command by @enjoy-binbin in #1379
- Convert 0.0.0.0 to local ip addresses when matching the cluster node by @zevin02 in #1392
Bug Fixes
- Use append action instead of nargs for cmake defs in x.py by @PragmaTwice in #1256
- Fix inconsistent response format with Redis by @git-hulk in #1269
- Force disable the IPO option in macOS by @git-hulk in #1271
- Fix outdated result in type command for expired keys by @jjz921024 in #1286
- Fix for execution timing of commands from lua by @DenizPiri in #1297
- Return empty string instead of nil in HGETALL, HVALS, HRANGEBYLEX responses by @torwig in #1315
- Relax race condition between subkey compaction thread by @dongdongwcpp in #1335
- Fix missing stream increment batch in cluster migration by @git-hulk in #1345
- Fix redundant newline in eval error compiling message by @git-hulk in #1361
- Add handling LMOVE in BatchExtractor by @torwig in #1364
- Fix disordered stack pop in replyToRedisReply by @PragmaTwice in #1380
- Fix CONFIG REWRITE append duplicate newlines by @enjoy-binbin in #1397
- Fix missing to set the cluster node id when loading by @git-hulk in #1384
Build & CI related
- Automatically build and push the docker image when tagging a new version by @git-hulk in #1247
- Revert "Automatically build and push the docker image when tagging a new version" by @git-hulk in #1248
- Add header filter for clang-tidy checks by @PragmaTwice in #1249
- Automatically set the env MACOSX_DEPLOYMENT_TARGET to the current macOS version unless the env is already set by @git-hulk in #1250
- Enable LuaJIT to improve the performance of scripts by @xiaobiaozhao in #1241
- build: Drop travis workflow by @tisonkun in #1258
- Use nproc instead of default for job numbers in docker build to avoid timeout by @PragmaTwice in #1272
- build: package sources in a folder by @tisonkun in #1332
- Fix clang-tidy warnings by @torwig in #1334
- Add clang-tidy checking for unit tests by @PragmaTwice in #1337
- Add some readability checks and fix all reports in current codebase by @PragmaTwice in #1348
- Fix stream_metadata enum -Wint-in-bool-context warning by @enjoy-binbin in #1349
- Enable readability-identifier-naming in clang-tidy by @PragmaTwice in #1383
- Fix member name convension for readability-identifier-naming by @PragmaTwice in #1385
- Remove underscore suffix for public member name by @PragmaTwice in #1386
- Check static class member and type alias name in readability-identifier-naming by @PragmaTwice in #1387
- Check method and namespace names in readability-identifier-naming by @PragmaTwice in #1388
- Check function names in readability-identifier-naming by @PragmaTwice in #13...
2.3.0
For this release, we now upgrade the RocksDB to 7.9.2
which will significantly improve the compaction performance. Another to be noticed, Kvrocks cluster mode will persist the cluster nodes' topology in the local file by default, you can disable it in flight by config set persist-cluster-nodes-enable no
.
New Features
- Add config for log cleaner by @IoCing in #1171
- Persist the cluster nodes info after applying the cluster topology by @git-hulk in #1219
- Add ability to set log level via config file by @torwig in #1230
Improvements
- Update RocksDB to 7.9.2 & Google test to 1.13.0 by @aleksraiden in #1229
- Unify write-like syscall wrappers in util.cc by @PragmaTwice in #1086
- Add LTO/IPO compile support by @wanghenshui in #764
- Introduce fmt dependency to simplify string formatting by @PragmaTwice in #1139
- Add the compatible Redis version to the info command by @xiaobiaozhao in #1158
- Make IO functions return StatusOr by @PragmaTwice in #1192
HrangebyLex
supports specify intervals by @tanruixiang in #1120- Remove old string parsing util and replace them by ParseInt by @PragmaTwice in #1191
- Add nodiscard attribute to Status and StatusOr by @PragmaTwice in #1193
- Add new lines after every section in Server::GetInfo by @kukey in #1199
- Add support of stream migration during slot migration process by @torwig in #1197
- Add timeout when replica connect master by @caipengbo in #1172
- Refactor slot migrate Go-tests by @torwig in #1208
- Refactoring: check function return Status marked as [[nodiscard]] by @torwig in #1214
- Make config load errors more friendly by @torwig in #1217
- Inplace construct error message in StatusOr while data type is large enough by @PragmaTwice in #1198
- Refine Status::Prefixed and add more test cases by @PragmaTwice in #1200
- Refactor return value of functions that related to a slot migration by @torwig in #1205
- Add integer parsing with unit support by @PragmaTwice in #1218
- Kvrocks2Redis: decode slot ID in cluster mode by @torwig in #1222
- Refactor config parsing in kvrocks2redis by @PragmaTwice in #1221
- Introduce command register mechanism to allow splitting command definition to multiple TUs by @PragmaTwice in #1140
- Add ParseFloat and replace stod with it by @PragmaTwice in #1227
- Make docker image more portable by @PragmaTwice in #1233
- Allow to enable the async_io option to improve the performance by @xiaobiaozhao in #1215
- Add TRYAGAIN prefix to error message for writing forbidden slot by @PragmaTwice in #1240
Bug Fixes
- Fix logging initialized before loading by @mapleFU in #1061
- Harden list_test.go by @tisonkun in #1141
- Fix redis cli test will fail if cannot read response at once by @git-hulk in #1129
- Fix the script load should return SHA as the bulk string by @git-hulk in #1133
- Fix format output in Server::GetRocksDBStatsJson by @PragmaTwice in #1142
- Increase blocking timeout to harden the blocking pop test case by @git-hulk in #1128
- Fix wrongly append the ERR prefix in no script error by @git-hulk in #1162
- Check if the thread is joinable before joining in the replication thread by @git-hulk in #1195
- Fix SockConect doesn't resolve domain before connecting by @git-hulk in #1183
- Fix error message passing in Server::Start by @PragmaTwice in #1225
- Fix deadlock when unblocking connection on stream by @torwig in #1228
Refine Code Style
- Clean code in redis_reply.cc by @PragmaTwice in #1085
- Fix
modernize-use-emplace
andperformance-unnecessary-copy-initialization
reported by clang-tidy by @PragmaTwice in #1084 - Fix performance-unnecessary-value-param warning reported by clang-tidy by @tanruixiang in #1106
- Fix modernize-use-bool-literals warning reported by clang-tidy by @MaximSmolskiy in #1107
- Fix modernize-make-unique warning reported by clang-tidy by @dl239 in #1113
- Fix performance-for-range-copy warning reported by clang-tidy by @MaximSmolskiy in #1108
- Fix performance-faster-string-find warning reported by clang-tidy by @MaximSmolskiy in #1109
- Fix modernize-redundant-void-arg warning reported by clang-tidy by @MaximSmolskiy in #1110
- Fix
modernize-avoid-bind
warning reported by clang-tidy by @Phoeniwx in #1121 - Fix modernize-use-auto warning reported by clang-tidy by @MaximSmolskiy in #1111
- Fix modernize-use-using warning reported by clang-tidy by @tanruixiang in #1114
- Fix performance-inefficient-vector-operation warning reported by clang-tidy by @tanruixiang in #1115
- Fix cppcoreguidelines-special-member-functions warning reported by cl… by @maochongxin in #1124
- Fix modernize-loop-convert warning reported by clang-tidy by @MaximSmolskiy in #1112
- Improve files structure by @tisonkun in #1134
- Tidy files inside src/commands by @torwig in #1137
- Replace c-style typedef with direct definition or using by @PragmaTwice in #1143
- Fix wrong include in redis_cmd.cc by @PragmaTwice in #1145
- Move VERSION to src/folder #1148 by @CNLHC in #1149
- Fix inconsistency between Set and ToString in OctalField by @PragmaTwice in #1151
- Fix cppcoreguidelines-init-variables warning reported by clang-tidy by @MaximSmolskiy in #1153
- Fix modernize-use-nullptr warning reported by clang-tidy by @MaximSmolskiy in #1156
- Fix cppcoreguidelines-macro-usage warning reported by clang-tidy by @PragmaTwice in #1155
- Fix StatusOr copy assignment by @SGZW in #1173
- Fix cppcoreguidelines-narrowing-conversions warning reported by clang-tidy by @MaximSmolskiy in #1159
- XREAD returns dedicated status if it blocks by @torwig in #1232
New Contributors
- @MaximSmolskiy made their first contribution in #1107
- @dl239 made their first contribution in #1113
- @Phoeniwx made their first contribution in #1121
- @wanghenshui made their first contribution in #764
- @CNLHC made their first contribution in #1149
- @SGZW made their first contribution in #1173
- @kukey made their first contribution in #1199
2.2.0
Notice
For this release, we are still using rocksdb 6.29, but we will update to rocksdb 7 in the next release (as in the unstable branch).
New Features
- Allow using LuaJIT to improve the performance of the Lua script (#697)
- Add the new command GETDEL (#771)
- Add the new command SMISMEMBER (#778)
- Add the new data structure Redis STREAM (#745)
- Add TLS support for kvrocks connections (#797)
- Add the new command HELLO (#881)
- Add the new command EVAL_RO (#782)
- Add the new command DISK (#882)
- Add the new command GETEX (#961)
- Support CLI options for the kvrocks server (#1037)
- Add the new command options for ZADD (#1022)
- Add ZLIB dependency for compression in rocksdb (#1078)
Improvements
- Switch the default value of log-dir to stdout (#754)
- Add fpm packaging to x.py (#752)
- Propagate sanitizer flags to all cmake deps (#759)
- Move runtest to x.py with customized server/cli path (#765)
- Add StatusOr for error handling in modern C++ style (#768)
- Add ParseInt in StatusOr style (#787)
- Show function name in backtrace (#796)
- Optimize get bitmap string and remove redundant num2bit array (#793)
- Allows Kvrocks to listen to only the unix socket (#809)
- Update dependency to latest version (lz4, libevent, gtest) (#828)
- Export the rocksdb write options (#885)
- Support quoted string and inline comment in config (#849)
- Add the FilterBlobByKey for SubKeyFilter (#902)
- Avoid using Get when iterating sub-keys during migration (#906)
- Support EXAT/PEXAT option in the set command (#901)
- Return from HRANGE if the key wasn't found (#923)
- Update jemalloc to 5.3.0 (#940)
- Use ParseInt to replace sto*, ato* (#924)
- Add UniqueFD and ScopeExit (#973)
- Align georadius behavior of redis (#993)
- Align the expire option behavior of redis (#1017)
- Support config set backup-dir new-dir (#1026)
- Use a consistent way to get the current time (#1038)
- Add support for showing used_memory_startup (#1044)
- Improve stack trace format and clean main.cc (#1053)
- Add command parser (#1032)
- Add WriteBatchInspector to inspect WriteBatch (#1069)
- Improve libunwind linking in CMake (#1079)
Bug Fixes
- Fix didn't return the out of range error in cluster import command(#767)
- Fix should forbid to create of the default namespace (#772)
- Fix CMake configuration error in snappy (#803)
- Fix inline protocol don't allow LF only EOL (#808)
- Fix successor commands won't be processed before receiving the next read event (#839)
- Fix georadius should return an empty set if the key does not exist (#845)
- Fix config set rocksdb.blob_garbage_collection_age_cutoff (#914)
- Fix ping with arg should return a bulk string (#933)
- Fix server cannot exit properly when enabling cluster mode (#969)
- Fix shouldn't lowercase the configuration value in kvrocks2redis(#971)
- Fix don't duplicate killed clients which have already flagged kCloseAfterReply (#1020)
- Fix properly parse cmake version (#1043)
- Fix rename-command only the first one works(#1047)
- Fix CAS and CAD return statuses (#1055)
- Fix random crash in the migration test case (#1068)
Test Refactoring
TCL tests are now moved to Go, refer to #811.
Misc
2.1.0
New features
- Support source packaging by x.py (#729)
- Support to use lz4 compression in RocksDB (#584)
- Allow to send logs to stdout/stderr (#613)
- LPOP/RPOP support pop multi elements (#594)
- Add LMove command (#577)
- Support to listen on the IPV6 address (#554)
- Add support for listening to unix socket (#531)
- Support BITOP command (#471)
- Support unlink command (#517)
Improvements
- replace shell scripts with x.py (#725)
- Use lock_guard to replace the manual mutex lock/unlock (#723)
- Build docker image with travis ci (#724)
- Return values instead of passing pointers (#722)
- Don't call GetCurrentTime in expired and type when possible (#709)
- Remove the slice
ToString()
when encoding or decoding the key (#707) - Use the const reference for avoiding copy (#704)
- Check sanitizer status for TCL tests in CI (#698)
- CMake: support ninja as a build backend (#626)
- Build static lib for glog (#618)
- Improve using of ASan and TSan in CMake build (#599)
- PSYNC based on Unique Replication Sequence ID (#538)
- Remove handwritten makefiles to keep only one build system (#576)
- Use FetchContent instead of ExternalProject and git submodules in CMake (#564)
- Upgrade the rocksdb version to 6.29.5(latest version for 6.x) (#555)
- Support to send auth command before migrating slots (#514)
- Allow to dynamic resize the
level_compaction_dynamic_level_bytes
and level base size (#497)
Bugfixes
- Make the set command consistent with redis (#730)
- Fix some time dependencies in replication.tcl (#688)
- Fix get rocksdb ops tcl test case (#668)
- Fix typos in config file (#669)
- Fix replication tests should wait for server restarted (#660)
- Fix the role command can't be used when loading data (#661)
- Fix Wrongly parsed the RESP empty/null array (#652)
- Fix compile warnings in kvrocks (#653)
- Fix unmatched iterator in Cluster::SetClusterNodes (#646)
- Fix load namespaces from the config file would ignore case (#642)
- Fix RocksDB can't auto resume after disk quota exceeded error (#628)
- Fix don't swallow the error when creating column families failed (#620)
- Compile lua by C++ compilers to avoid memory leaks (#614)
- Fix the slave may crash when restoring the db (#606)
- Fix leaks reported by ASan (#605)
- Fix can't find jemalloc when building with makefile on MacOSX (#557)
- Stop sending files if failed in full synchronization (#539)
- Avoid requirepass and masterauth conflicts with the namespace tokens (#507)
- Fix slave can't resync with master after password change (#520)
- Fix rocksdb cmake depends should use list instead of string (#518)
- Fix spop command should return bulk string instead of array when without count(#515)
- Fix wrong replication state (#506)
- Avoid flush all redis db in kvrocks2redis (#498)
- Fix failing in setting thread name with string more than 16 byte (#496)
- Avoid accessing slot_migrate_ before it is created (#472)
- Fix the connection fd was used after free (#479)
Others
2.0.6
Thanks ChrisZMF who implements slot-based data migration for Kvrocks cluster
mode, this authentically makes kvrocks cluster scalable. Even though it already is
used in production environments, you still should be cautious of it.
Here is a comprehensive list of changes in this release compared to 2.0.5
New features
- Support slot-based data migration (#430)
Biggest feature of this version, authentically makes kvrocks scalable,
user can use CLUSTERX MIGRATE command to migrate slot and use CLUSTERX
SETSLOT to change cluster slot distribution after finishing migration. - Make level0_file_num_compaction_trigger of RocksDB configurable (#455)
- Support CLUSTERX SETSLOT command (#463)
Improvements
- Support executing INFO command during restoring database (#375)
- Auto Rewrite the config after the namespace was updated (#423)
- Support to convert sortedint type to zset type in kvrocks2redis (#431)
- Optimize the seek of RocksDB iterators (#438)
- Make the bitmap range the same with that of Redis (#465)
- Support GET command on bitmap type (#447)
- Support to use row cache of RocksDB (#407)
Bug fixes
- Fix the parameter blob_garbage_collection_age_cutoff would be always zero (#425)
- Fix config rewrite overwrite the first rename-command with the last one (#429)
- Fix zrevrangebyscore for multi members with the same max score (#434)
- Fix data race in SetCurrentConnection (#440)
- Fix failing full replication when enabling slave-empty-db-before-fullsync (#446)
- Fix memory leak when full replication (#461)
Maybe leak dozen kilobytes per full replication - Fix the bitmap range is smaller than that of Redis (#465)
2.0.5
Here is a comprehensive list of changes in this release compared to 2.0.4
New features
-
Implement zrevrangebylex command (#381)
-
Use some rocksdb new feature (#395)
- Support blob db (key-value separation) which requires RocksDB version greater than 6.18
- Enable partitioned index/filter for SST and hash index for data block
- Enable whole key filter for memtable
- Remove dynamic resize block and SST
- Only apply compression to SST which level is more than 2
Please note that, if your rocksdb version is lower than 6.6.0, it can't reload the data of new version,
you should update cautiously. -
Implement CAS and CAD commands for string type (#415)
-
Support to use row cache of RocksDB (#407)
Improvements
- Add rocksdb ops statistics into the info command (#387)
These statistics can more truly reflect the load of rocksdb. - Add the maxclients to the info command output (#391)
- Add write stall/stop stats to info command output (#396)
- Make kvrocks2redis work (#404)
- Adjust the max open file limit according to the max clients and
rocksdb max open files (#418)
Related projects
- Kvrocks exporter, a fork of oliver006/redis_exporter to export the kvrocks metrics,
https://github.com/KvrocksLabs/kvrocks_exporter
2.0.4
Here is a comprehensive list of changes in this release compared to 2.0.3
New features
- Support LUA script commands (#363) (#369)
Currently, support EVAL, EVALSHA, and SCRIPT commands, but SCRIPT KILL
and DEBUG subcommands are not supported.
Improvements
- Allow metadata and subkey CF to share a single block cache (#365) (#373)
- Add master_repl_offset in INFO command output (#374)
Bugfixes
- Fixed dynamic resize target_file_size_base bug (#368)
Before we only apply this strategy to the default CF(i.e. subkey CF)
2.0.3
If your kvrocks instances are 2.0.2 and use redis-sentinel to implement HA, you should
upgrade urgently, please see #352 for details.
Here is a comprehensive list of changes in this release compared to 2.0.2
Improvements
- Use the rocksdb MultiGet interface in the MGET command (#331)
- Avoid useless space allocation in SetBit (#338)
- Auto set master/replica replication by cluster topology (#356)
- Support client kill type subcommands to adapt redis-sentinel (#352) (#361)
From 2.0.2, we support MULTI-EXEC, but don't support client kill type $type,
so MULTI-EXEC will be rollbacked when failing to parse unknown kill type
in client command, and cause redis-sentinel fails to failover.
Bugfixes
2.0.2
We design new cluster solution for kvrocks, but it is experimental, don't recommend
to deploy in production environments. And because in cluster mode, to be efficient to
migrate keys based on slot when scale, we encode key with slot id, but in order to be
compatible with the old version, we don't do that in standalone mode, so data is not
compatible between standalone mode with cluster mode, you must migrate data if
you want to change mode, otherwise, kvrocks will make data corrupt.
In order to better support the cluster mode, we are developing a meta server to
manage kvrocks cluster, coming soon!
Here is a comprehensive list of changes in this release compared to 2.0.1
New features
- Support rename command in config file (#272)
- Support transaction (#285)
Support MULTI, EXEC, DISCARD command, but don't support
WATCH and UNWATCH commands. - Support the auto-resize-block-and-sst config directive (#289)
- Support to resize rocksdb.block_size automatically (#294)
- Support cluster mode (#302)
Similar with redis cluster mode, but use CLUSTERX command to set
cluster topology (#324).
Data encoding changes
- Encode key with slot id (#291) (#330)
In cluster mode, to be efficient to migrate keys by slot when scale,
we encode key with slot id, but in standalone mode, we don't. That is
to say, data is not compatible between standalone mode with cluster mode,
you must migrate data if you want to change mode, otherwise, kvrocks
will make data corrupt.
Bug fixes
- Set TCP_KEEPALIVE for replication connection (#284)
Replicas can handle network failure with master, before this commit,
network failure may result in unrecoverable replication interrupt. - Fix ZSET can't add the same member with different scores (#298)
- Make CONFIG SET command thread safe (#310)
- Fix LTRIM only delete first item, LREM can't correctly remove
repeated items (#314)
Improvements
2.0.1
Here is a comprehensive list of changes in this release compared to 2.0.0
New features
- Support COMMAND command (#251)
- Support to purge backups on fullsync to reduce disk space usage (#245)
Bug fixes
- Fix uninitialized Rocksdb.level0_stop_writes_trigger (#236)
- Fix condition race for ReclaimOldDBPtr (#246)
- Fix data race for accessing database in some commands (#253) (#261)
In spop, zremrangebylex, zremrangebyscore commands, the lock guard
for accessing the database may not work actually. - Fix returning wrong string range in GETRANGE command (#254)
- Fix skipping wrong CURRENT file when full synchronization (#260)
Resuming broken transfer based files may be not available if replicas
skip transferred wrong CURRENT file of RocksDB.
Improvements
- Replicas can execute publish command (#238)
- Optimizations for avoiding unnecessary data copy (#239) (#247)
- Allow to run the kvrocks without assigning the config file (#264)
Dependencies
- Upgrade the jemalloc version to the special commit (#265)
To be able to compile on macOS, upgrade jemalloc to the production
test commit which mentioned in jemalloc/jemalloc#2060.