futriix/tests/unit/flash.tcl

217 lines
12 KiB
Tcl
Raw Normal View History

Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
if {$::flash_enabled} {
start_server [list tags {flash} overrides [list storage-provider {flash ./rocks.db} delete-on-evict no storage-flush-period 10]] {
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { FLASH - GET works after eviction } {
r set testkey foo
r flushall cache
assert_equal {foo} [r get testkey]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { DEL of nonexistant key returns 0 } {
r flushall
assert_equal {0} [r del foobar]
assert_equal {0} [r dbsize] "Key count is accurate after non-existant delete"
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { DEL of flushed key works } {
r flushall
r set testkey foo
assert_equal {1} [r dbsize] "Only one key after first insert"
r flushall cache
assert_equal {foo} [r get testkey] "Value still there after flushing cache"
r del testkey
assert_equal {0} [r dbsize] "No keys after delete"
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { SET of existing but flushed key works } {
r flushall
r set testkey foo
assert_equal {1} [r dbsize] "Only one key after first insert"
r flushall cache
assert_equal {1} [r dbsize] "Only one key after flushall cache"
r set testkey bar
assert_equal {1} [r dbsize] "Only one key after overwrite"
assert_equal {bar} [r get testkey]
}
test { SET of existing but flushed key with EXPIRE works } {
r flushall
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
assert_equal {0} [r dbsize]
r set testkey foo ex 10000
assert_equal {1} [r dbsize] "Only one key after first insert"
r flushall cache
assert_equal {1} [r dbsize] "Only one key after flushall cache"
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
r set testkey bar ex 10000
assert_equal {1} [r dbsize] "Only one key after overwrite"
assert_equal {bar} [r get testkey]
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
assert [expr [r ttl testkey] > 0]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { EXPIRE of existing but flushed key } {
r flushall
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
assert_equal {0} [r dbsize]
r set testkey foo
assert_equal {1} [r dbsize]
r flushall cache
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
r expire testkey 10000
assert_equal {1} [r dbsize]
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
assert_equal {foo} [r get testkey]
assert [expr [r ttl testkey] > 0]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { CREATE and UPDATE in transaction, key count is accurate } {
r flushall
r multi
r set testkey 2
r incr testkey
r exec
assert_equal {1} [r dbsize]
assert_equal {3} [r get testkey]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { EXPIRE key count is accurate } {
r flushall
r set testkey foo ex 1
r flushall cache
assert_equal {1} [r dbsize]
Merge latest internal to OSS (#720) * add docker build * fix the working dir in Dockerfile * add release publish docker image * address intentation and use default release * migrate keydb_modstatsd to keydb-internal * rm * add submodule cpp-statsd-client * include trigger keydb_modstatsd Makefile in modules Makefile * update * have clean also trigger keydb_modstatsd clean * move cpp-statsd-client to deps * checkout to a06a5b9359f31d946fe163b9038586982971ae49 * update relative path in compilation * remove submodule instead use the source * include building keydb statsd module * fix check in Dockerfile docker-entrypoint.sh * fix * fix the comment caused stuck docker build * use commit hash as tag template * fix * test tag * Revert "test tag" This reverts commit 9cbc57137d57aab4fdd5a9283bae07391b3c7f8b. * make docker build independent * add new build to ci * emit system free metrics with '/proc/meminfo' * have emit system free memory within metrics_time_taken_us and also add metric time taken for it * Remove Expireset (#217) Major refactor to place expiry information directly in the object struct. * update MemFree to MemAvailable in keydb statsd * add metric emit for non-empty primary with less than 2 connected replicas * address comments * Multiply CPU percent metric by 100 * Fix memory leaks * Fix slow to free when low lock contention * fix nodename metricsname * fix unnecessary replace * Make propagating before freeing module context optional (#225) * don't propogate on module context free for rdb load * default in wrong place * Flash expiration (#197) Design Doc: https://docs.google.com/document/d/1NmnYGnHLdZp-KOUCUatX5iXpF-L3YK4VUc9Lm3Tqxpo/edit?usp=sharing * Emit more aggregate metrics in modstatsd (#223) * Permit keys of differing slots as long as they are served by this cluster and we are not migrating * Fix over pessimistic checks that prevent replicas from serving mget * Fix logic bug * async rehash is preventing rehashing during RDB load after a db flush. Ensure it can't interefere after a flush * make async rehash configurable * only use internal locks when multithreaded (#205) * Fix crossslot error migrating batches of keys * Fix bug where we erroneously answer queries belonging to another shard * fix mac compile * enable level_compaction_dynamic_level_bytes after flush, and flush expires for FLASH (#229) * enable level_compaction_dynamic_level_bytes after flush, and flush expires * update debug reload for flash * update debug reload for flash complete * missing forward declare * commit existing changes then track changes for debug reload * missing args * commitChanges is conditional Co-authored-by: John Sully <jsully@snapchat.com> --------- Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: Alex Cope <acope@snapchat.com> Co-authored-by: John Sully <john@csquare.ca>
2023-09-28 18:13:27 -04:00
wait_for_condition 50 1000 {
[r dbsize] == 0
} else {
fail "key is not expired"
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { SUBKEY EXPIRE persists after cache flush } {
r flushall
r sadd testkey foo bar baz
r expiremember testkey foo 10000
r flushall cache
assert [expr [r ttl testkey foo] > 0]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { LIST pop works after flushing cache } {
r flushall
r lpush testkey foo
r flushall cache
assert_equal {foo} [r lpop testkey]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
test { DIGEST string the same after flushing cache } {
r flushall
r set testkey foo
r set testkey1 foo ex 10000
set expectedDigest [r debug digest]
r flushall cache
assert_equal $expectedDigest [r debug digest]
}
test { DIGEST list the same after flushing cache } {
r flushall
r lpush testkey foo bar
set expectedDigest [r debug digest]
r flushall cache
assert_equal $expectedDigest [r debug digest]
}
test { DELETE of flushed set member persists after another flush } {
r flushall
r sadd set1 val1 val2 val3
assert_equal {3} [r scard set1]
r flushall cache
r srem set1 val1
r flushall cache
assert_equal {2} [r scard set1]
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
r flushall
# If a weak storage memory model is set, wait for any pending snapshot writes to finish
after 500
foreach policy {
allkeys-random allkeys-lru allkeys-lfu
} {
test "FLASH - is eviction working without data loss (successfully stored to flash)? (policy $policy)" {
# Get the current memory limit and calculate a new limit.
# Set limit to 100M.
set used [s used_memory]
set limit [expr {$used+60*1024*1024}]
r config set maxmemory $limit
r config set maxmemory-policy $policy
# Now add keys equivalent to 1024b until the limit is almost reached.
set numkeys 0
r set first val
while 1 {
r set $numkeys xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
incr numkeys
if {[s used_memory]+1024 >= $limit} {
Merge latest internal to OSS (#720) * add docker build * fix the working dir in Dockerfile * add release publish docker image * address intentation and use default release * migrate keydb_modstatsd to keydb-internal * rm * add submodule cpp-statsd-client * include trigger keydb_modstatsd Makefile in modules Makefile * update * have clean also trigger keydb_modstatsd clean * move cpp-statsd-client to deps * checkout to a06a5b9359f31d946fe163b9038586982971ae49 * update relative path in compilation * remove submodule instead use the source * include building keydb statsd module * fix check in Dockerfile docker-entrypoint.sh * fix * fix the comment caused stuck docker build * use commit hash as tag template * fix * test tag * Revert "test tag" This reverts commit 9cbc57137d57aab4fdd5a9283bae07391b3c7f8b. * make docker build independent * add new build to ci * emit system free metrics with '/proc/meminfo' * have emit system free memory within metrics_time_taken_us and also add metric time taken for it * Remove Expireset (#217) Major refactor to place expiry information directly in the object struct. * update MemFree to MemAvailable in keydb statsd * add metric emit for non-empty primary with less than 2 connected replicas * address comments * Multiply CPU percent metric by 100 * Fix memory leaks * Fix slow to free when low lock contention * fix nodename metricsname * fix unnecessary replace * Make propagating before freeing module context optional (#225) * don't propogate on module context free for rdb load * default in wrong place * Flash expiration (#197) Design Doc: https://docs.google.com/document/d/1NmnYGnHLdZp-KOUCUatX5iXpF-L3YK4VUc9Lm3Tqxpo/edit?usp=sharing * Emit more aggregate metrics in modstatsd (#223) * Permit keys of differing slots as long as they are served by this cluster and we are not migrating * Fix over pessimistic checks that prevent replicas from serving mget * Fix logic bug * async rehash is preventing rehashing during RDB load after a db flush. Ensure it can't interefere after a flush * make async rehash configurable * only use internal locks when multithreaded (#205) * Fix crossslot error migrating batches of keys * Fix bug where we erroneously answer queries belonging to another shard * fix mac compile * enable level_compaction_dynamic_level_bytes after flush, and flush expires for FLASH (#229) * enable level_compaction_dynamic_level_bytes after flush, and flush expires * update debug reload for flash * update debug reload for flash complete * missing forward declare * commit existing changes then track changes for debug reload * missing args * commitChanges is conditional Co-authored-by: John Sully <jsully@snapchat.com> --------- Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: Alex Cope <acope@snapchat.com> Co-authored-by: John Sully <john@csquare.ca>
2023-09-28 18:13:27 -04:00
break
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
}
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
# Add additional keys to force eviction
# should still be under the limit for maxmemory, however all keys set should still exist between flash and memory
# check same number of keys exist in addition to values of first and last keys
set err 0
Merge latest internal to OSS (#720) * add docker build * fix the working dir in Dockerfile * add release publish docker image * address intentation and use default release * migrate keydb_modstatsd to keydb-internal * rm * add submodule cpp-statsd-client * include trigger keydb_modstatsd Makefile in modules Makefile * update * have clean also trigger keydb_modstatsd clean * move cpp-statsd-client to deps * checkout to a06a5b9359f31d946fe163b9038586982971ae49 * update relative path in compilation * remove submodule instead use the source * include building keydb statsd module * fix check in Dockerfile docker-entrypoint.sh * fix * fix the comment caused stuck docker build * use commit hash as tag template * fix * test tag * Revert "test tag" This reverts commit 9cbc57137d57aab4fdd5a9283bae07391b3c7f8b. * make docker build independent * add new build to ci * emit system free metrics with '/proc/meminfo' * have emit system free memory within metrics_time_taken_us and also add metric time taken for it * Remove Expireset (#217) Major refactor to place expiry information directly in the object struct. * update MemFree to MemAvailable in keydb statsd * add metric emit for non-empty primary with less than 2 connected replicas * address comments * Multiply CPU percent metric by 100 * Fix memory leaks * Fix slow to free when low lock contention * fix nodename metricsname * fix unnecessary replace * Make propagating before freeing module context optional (#225) * don't propogate on module context free for rdb load * default in wrong place * Flash expiration (#197) Design Doc: https://docs.google.com/document/d/1NmnYGnHLdZp-KOUCUatX5iXpF-L3YK4VUc9Lm3Tqxpo/edit?usp=sharing * Emit more aggregate metrics in modstatsd (#223) * Permit keys of differing slots as long as they are served by this cluster and we are not migrating * Fix over pessimistic checks that prevent replicas from serving mget * Fix logic bug * async rehash is preventing rehashing during RDB load after a db flush. Ensure it can't interefere after a flush * make async rehash configurable * only use internal locks when multithreaded (#205) * Fix crossslot error migrating batches of keys * Fix bug where we erroneously answer queries belonging to another shard * fix mac compile * enable level_compaction_dynamic_level_bytes after flush, and flush expires for FLASH (#229) * enable level_compaction_dynamic_level_bytes after flush, and flush expires * update debug reload for flash * update debug reload for flash complete * missing forward declare * commit existing changes then track changes for debug reload * missing args * commitChanges is conditional Co-authored-by: John Sully <jsully@snapchat.com> --------- Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: Alex Cope <acope@snapchat.com> Co-authored-by: John Sully <john@csquare.ca>
2023-09-28 18:13:27 -04:00
set extra_keys [expr floor([expr ($limit * 0.4) / 1024])]
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
for {set j 0} {$j < $extra_keys} {incr j} {
catch {
Merge latest internal to OSS (#720) * add docker build * fix the working dir in Dockerfile * add release publish docker image * address intentation and use default release * migrate keydb_modstatsd to keydb-internal * rm * add submodule cpp-statsd-client * include trigger keydb_modstatsd Makefile in modules Makefile * update * have clean also trigger keydb_modstatsd clean * move cpp-statsd-client to deps * checkout to a06a5b9359f31d946fe163b9038586982971ae49 * update relative path in compilation * remove submodule instead use the source * include building keydb statsd module * fix check in Dockerfile docker-entrypoint.sh * fix * fix the comment caused stuck docker build * use commit hash as tag template * fix * test tag * Revert "test tag" This reverts commit 9cbc57137d57aab4fdd5a9283bae07391b3c7f8b. * make docker build independent * add new build to ci * emit system free metrics with '/proc/meminfo' * have emit system free memory within metrics_time_taken_us and also add metric time taken for it * Remove Expireset (#217) Major refactor to place expiry information directly in the object struct. * update MemFree to MemAvailable in keydb statsd * add metric emit for non-empty primary with less than 2 connected replicas * address comments * Multiply CPU percent metric by 100 * Fix memory leaks * Fix slow to free when low lock contention * fix nodename metricsname * fix unnecessary replace * Make propagating before freeing module context optional (#225) * don't propogate on module context free for rdb load * default in wrong place * Flash expiration (#197) Design Doc: https://docs.google.com/document/d/1NmnYGnHLdZp-KOUCUatX5iXpF-L3YK4VUc9Lm3Tqxpo/edit?usp=sharing * Emit more aggregate metrics in modstatsd (#223) * Permit keys of differing slots as long as they are served by this cluster and we are not migrating * Fix over pessimistic checks that prevent replicas from serving mget * Fix logic bug * async rehash is preventing rehashing during RDB load after a db flush. Ensure it can't interefere after a flush * make async rehash configurable * only use internal locks when multithreaded (#205) * Fix crossslot error migrating batches of keys * Fix bug where we erroneously answer queries belonging to another shard * fix mac compile * enable level_compaction_dynamic_level_bytes after flush, and flush expires for FLASH (#229) * enable level_compaction_dynamic_level_bytes after flush, and flush expires * update debug reload for flash * update debug reload for flash complete * missing forward declare * commit existing changes then track changes for debug reload * missing args * commitChanges is conditional Co-authored-by: John Sully <jsully@snapchat.com> --------- Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: Alex Cope <acope@snapchat.com> Co-authored-by: John Sully <john@csquare.ca>
2023-09-28 18:13:27 -04:00
r set p2$j xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
} err
assert {$err == {OK}}
}
if {[log_file_matches [srv 0 stdout] "*Failed to evict*"]} {
fail "Server did not evict cleanly (detected full flush)"
}
r set last val
set dbsize [r dbsize]
assert {[s used_memory] < ($limit*1.2)}
assert {$dbsize == $numkeys+$extra_keys+2}
assert {[r get first] == {val}}
assert {[r get last] == {val}}
r flushall
}
Merge latest internal to OSS (#720) * add docker build * fix the working dir in Dockerfile * add release publish docker image * address intentation and use default release * migrate keydb_modstatsd to keydb-internal * rm * add submodule cpp-statsd-client * include trigger keydb_modstatsd Makefile in modules Makefile * update * have clean also trigger keydb_modstatsd clean * move cpp-statsd-client to deps * checkout to a06a5b9359f31d946fe163b9038586982971ae49 * update relative path in compilation * remove submodule instead use the source * include building keydb statsd module * fix check in Dockerfile docker-entrypoint.sh * fix * fix the comment caused stuck docker build * use commit hash as tag template * fix * test tag * Revert "test tag" This reverts commit 9cbc57137d57aab4fdd5a9283bae07391b3c7f8b. * make docker build independent * add new build to ci * emit system free metrics with '/proc/meminfo' * have emit system free memory within metrics_time_taken_us and also add metric time taken for it * Remove Expireset (#217) Major refactor to place expiry information directly in the object struct. * update MemFree to MemAvailable in keydb statsd * add metric emit for non-empty primary with less than 2 connected replicas * address comments * Multiply CPU percent metric by 100 * Fix memory leaks * Fix slow to free when low lock contention * fix nodename metricsname * fix unnecessary replace * Make propagating before freeing module context optional (#225) * don't propogate on module context free for rdb load * default in wrong place * Flash expiration (#197) Design Doc: https://docs.google.com/document/d/1NmnYGnHLdZp-KOUCUatX5iXpF-L3YK4VUc9Lm3Tqxpo/edit?usp=sharing * Emit more aggregate metrics in modstatsd (#223) * Permit keys of differing slots as long as they are served by this cluster and we are not migrating * Fix over pessimistic checks that prevent replicas from serving mget * Fix logic bug * async rehash is preventing rehashing during RDB load after a db flush. Ensure it can't interefere after a flush * make async rehash configurable * only use internal locks when multithreaded (#205) * Fix crossslot error migrating batches of keys * Fix bug where we erroneously answer queries belonging to another shard * fix mac compile * enable level_compaction_dynamic_level_bytes after flush, and flush expires for FLASH (#229) * enable level_compaction_dynamic_level_bytes after flush, and flush expires * update debug reload for flash * update debug reload for flash complete * missing forward declare * commit existing changes then track changes for debug reload * missing args * commitChanges is conditional Co-authored-by: John Sully <jsully@snapchat.com> --------- Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: Alex Cope <acope@snapchat.com> Co-authored-by: John Sully <john@csquare.ca>
2023-09-28 18:13:27 -04:00
test "FLASH - is flash eviction working? (policy $policy)" {
# Get the current memory limit and calculate a new limit.
# Set limit to 100M.
set used [s used_memory]
set limit [expr {$used+60*1024*1024}]
r config set maxmemory $limit
r config set maxmemory-policy $policy
# Now add keys equivalent to 1024b until the limit is almost reached.
set numkeys 0
r set first val
while 1 {
r set $numkeys xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
incr numkeys
if {[s used_memory]+1024 >= $limit} {
break
}
}
# Add additional keys to force eviction
# should still be under the limit for maxmemory, however all keys set should still exist between flash and memory
# check same number of keys exist in addition to values of first and last keys
set err 0
set extra_keys [expr floor([expr ($limit * 0.4) / 1024])]
for {set j 0} {$j < $extra_keys} {incr j} {
catch {
r set p2$j xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
} err
assert {$err == {OK}}
}
if {[log_file_matches [srv 0 stdout] "*Failed to evict*"]} {
fail "Server did not evict cleanly (detected full flush)"
}
r set last val
r debug flush-storage
r config set maxstorage 1
r config set maxmemory 1
set dbsize [r dbsize]
# after setting maxstorage and memory below used amount we should evict from storage provider
assert {$dbsize < $numkeys+$extra_keys+2}
r config set maxstorage 0
r config set maxmemory 0
r flushall
}
}
Merge main with oss release sep29 2022 (#521) * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * update packaging for OS merge * update packaging for OS merge * modify dockerfile to build within image * modify dockerfile to build within image * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * Only run the tls-name-validation test if --tls is passed into runtest * Only run the tls-name-validation test if --tls is passed into runtest * Fix KeyDB not building with TLS < 1.1.1 * Fix KeyDB not building with TLS < 1.1.1 * update changelog to use replica as terminology * update changelog to use replica as terminology * update copyright * update copyright * update deb copyright * update deb copyright * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * setup Machamp ci * setup Machamp ci * make build_test.sh executable * make build_test.sh executable * PSYNC production fixes * PSYNC production fixes * fix the Machamp build * fix the Machamp build * break into tests into steps * break into tests into steps * Added multimaster test * Added multimaster test * Update ci.yml Change min tested version to 18.04 * Update ci.yml Change min tested version to 18.04 * fork lock for all threads, use fastlock for readwritelock * fork lock for all threads, use fastlock for readwritelock * hide forklock object in ae * hide forklock object in ae * only need to include readwritelock in ae * only need to include readwritelock in ae * time thread lock uses fastlock instead of std::mutex * time thread lock uses fastlock instead of std::mutex * set thread as offline when waiting for time thread lock * set thread as offline when waiting for time thread lock * update README resource links * update README resource links * Fix MALLOC=memkind build issues * Fix MALLOC=memkind build issues * Fix module test break * Fix module test break * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * Eliminate firewall dialogs on mac for regular and cluster tests. There are still issues with the sentinel tests but attempting to bind only to localhost causes failures * remove unused var in networking.cpp * remove unused var in networking.cpp * check ziplist len to avoid crash on empty ziplist convert * check ziplist len to avoid crash on empty ziplist convert * remove nullptr subtraction * remove nullptr subtraction * cannot mod a pointer * cannot mod a pointer * need to include stdint for uintptr_t * need to include stdint for uintptr_t * use atomic_load for g_pserver->mstime * use atomic_load for g_pserver->mstime * Integrate readwritelock with Pro Code * Integrate readwritelock with Pro Code * Defensive asserts for RWLock * Defensive asserts for RWLock * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * Save and restore master info in rdb to allow active replica partial sync (#371) * save replid for all masters in rdb * expanded rdbSaveInfo to hold multiple master structs * parse repl-masters from rdb * recover replid info from rdb in active replica mode, attempt partial sync * save offset from rdb into correct variable * don't change replid based on master in active rep * save and load psync info from correct fields * placement new instead of memcpy * placement new instead of memcpy * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Remove asserts, RW lock can go below zero in cases of aeAcquireLock * Inclusive language * Inclusive language * call aeThreadOnline() earlier * call aeThreadOnline() earlier * Removed mergeReplicationId * Removed mergeReplicationId * Make active client balancing a configurable option * Make active client balancing a configurable option * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * With TLS throttle accepts if server is under heavy load - do not change non TLS behavior * acceptTLS is threadsafe like the non TLS version * acceptTLS is threadsafe like the non TLS version * PSYNC production fixes * PSYNC production fixes * Ensure we are responsive during storagecache clears * Ensure we are responsive during storagecache clears * Ensure recreated tables use the same settings as ones made at boot * Ensure recreated tables use the same settings as ones made at boot * Converted some existing PSYNC tests for multimaster * Converted some existing PSYNC tests for multimaster * Inclusive language fix * Inclusive language fix * Cleanup test suite * Cleanup test suite * Updated test replica configs so tests make sense * Updated test replica configs so tests make sense * active-rep test reliability * active-rep test reliability * Quick fix to make psync tests work * Quick fix to make psync tests work * Fix PSYNC test crashes * Fix PSYNC test crashes * Ensure we force moves not copies when ingesting bulk insert files * Ensure we force moves not copies when ingesting bulk insert files * Disable async for hget commands as it is not ready * Disable FLASH * Fix crash in save of masterinfo * Fix musl/Alpine build failures * Remove unnecessary libs * update readme * update readme * remove Enterprise references * Limit max overage to 20% during RDB save * Delete COPYING to replace with BSD license * update deb master changelog * Update license * Fix Readme typo from github org transition Replace mention of scratch-file-path with db-s3-object * Fix reference counting failure in the dict. This is caused by std::swap also swapping refcounts * Fix assertion in async rehash * Prevent crash on shutdown by avoiding dtors (they are unnecessary anyways) * Initialize noshrink, it was dangling * Prevent us from starting a rehash when one wasn't already in progress. This can cause severe issues for snapshots * Avoid unnecessary rehashing when a rehash is abandoned * Dictionary use correct acquire/release semantics * Add fence barriers for the repl backlog (important for AARCH64 and other weak memory models) * Silence TSAN errors on ustime and mstime. Every CPU we support is atomic on aligned ints, but correctness matters * Disable async commands by default * Fix TSAN warnings on the repl backlog * Merge OSS back into pro * Fix unmerged files * Fix O(n^2) algorithm in the GC cleanup logic * Fix crash in expire when a snapshot is in flight. Caused by a perf optimization getting the expire map out of sync with the val * On Alpine we must have a reasonable stack size * Revert ci.yml to unstable branch version * Implements the soft shutdown feature to allow clients to cooperatively disconnect preventing disruption during shutdown * Ensure clean shutdown with multiple threads * update dockerfiles * update deb pkg references and changelog * update gem reference * lpGetInteger returns int64_t, avoid overflow (#10068) Fix #9410 Crucial for the ms and sequence deltas, but I changed all calls, just in case (e.g. "flags") Before this commit: `ms_delta` and `seq_delta` could have overflown, causing `currid` to be wrong, which in turn would cause `streamTrim` to trim the entire rax node (see new test) * Fix issue #454 (BSD build break) * Do not allow commands to run in background when in eval, Issue #452 * Fix certificate leak during connection when tls-allowlists are used * Fix issue #480 * Fix crash running INFO command while a disk based backlog is set * check tracking per db * fix warnings * Fix a race when undoConnectWithMaster changes mi->repl_transfer_s but the connection is not yet closed and the event handler runs * Fix a race in processChanges/trackChanges with rdbLoadRio by acquiring the lock when trackChanges is set * Fix ASAN use after free * Additional fixes * Fix integer overflow of the track changes counter * Fix P99 latency issue for TLS where we leave work for the next event loop tlsProcessPendingData() needs to be called before we execute queued commands because it may enqueue more commands * Fix race removing key cache * Prevent crash on load in long running KeyDB instances * Fixes a crash where the server assertion failed when the key exists in DB during RDB load * Remove old assertion which is commented out. * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * avoid from instatiating EpochHolder multiple times to improve performance and cpu utilization * src\redis-cli.c: fix potential null pointer dereference found by cppcheck src\redis-cli.c:5488:35: warning: Either the condition '!table' is redundant or there is possible null pointer dereference: table. [nullPointerRedundantCheck] * Fix Issue #486 * Workaround bug in snapshot sync - abort don't crash * Improve reliability of async parts of the soft shutdown tests * Improve reliability of fragmentation tests * Verify that partial syncs do indeed occur * Fix O(n) algorithm in INFO command * Remove incorrect assert that fires when the repl backlog is used fully * Make building flash optional * Remove unneeded gitlab CI file * [BUG] Moves key to another DB, the source key was removed if the move failed due to the key exists in the destination db #497 (#498) Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> * trigger repl_curr_off!= master_repl_offset assert failure when having pending write case * use debug for logging the message instead * rocksdb log using up the diskspace on flash (#519) * Fix OpenSSL 3.0.x related issues. (#10291) * Drop obsolete initialization calls. * Use decoder API for DH parameters. * Enable auto DH parameters if not explicitly used, which should be the preferred configuration going forward. * remove unnecessary forward declaration * remove internal ci stuff * remove more internal ci/publishing * submodule update step * use with syntax instead * bump ci ubuntu old ver as latest is now 22.04 * include submodules on all ci jobs * install all deps for all ci jobs Co-authored-by: Vivek Saini <vsaini@snapchat.com> Co-authored-by: Christian Legge <christian@eqalpha.com> Co-authored-by: benschermel <bschermel@snapchat.com> Co-authored-by: John Sully <john@csquare.ca> Co-authored-by: zliang <zliang@snapchat.com> Co-authored-by: malavan <malavan@eqalpha.com> Co-authored-by: John Sully <jsully@snapchat.com> Co-authored-by: jfinity <38383673+jfinity@users.noreply.github.com> Co-authored-by: benschermel <43507366+benschermel@users.noreply.github.com> Co-authored-by: guybe7 <guy.benoish@redislabs.com> Co-authored-by: Karthick Ariyaratnam (A) <k00809413@china.huawei.com> Co-authored-by: root <paul.chen1@huawei.com> Co-authored-by: Ilya Shipitsin <chipitsine@gmail.com> Co-authored-by: Paul Chen <32553156+paulmchen@users.noreply.github.com> Co-authored-by: Paul Chen <mingchen@Mings-MacBook-Pro.local> Co-authored-by: Yossi Gottlieb <yossigo@gmail.com>
2022-12-14 12:17:36 -05:00
}
}