1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
Commit graph

1639 commits

Author SHA1 Message Date
romange
21cc7e9aaf chore(helm-chart): update to v1.12.0 2023-11-03 06:43:21 +00:00
Shahar Mike
414f6aad2c
feat(server): Add /clusterz page with info on cluster (#2115)
It's not the prettiest, but it's functional.
2023-11-03 08:09:52 +02:00
Vladislav
e46dd24bb7
chore(search): Safe json validation, serialize fix (#2100)
* chore(search): Safe json validation, serialize fix

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-02 23:43:11 +03:00
Vladislav
146f46e77a
fix: more server state read in command invocation (#2114)
fix: more server state read
2023-11-02 18:17:10 +00:00
Shahar Mike
169c9d3975
fix(regTests): Wait between ACTIVE until `stable_sync (#2111)
Regression test sometimes fails because for a short period of time after `wait_available_async()` returns, the result of `ROLE` could still be different from `stable_sync`

[Failure example](https://github.com/dragonflydb/dragonfly/actions/runs/6726461923/job/18282759612#step:6:1863)

We change our state from `LOADING` to `ACTIVE` [here](d08d7f13b4/src/server/replica.cc (L426)), but then we change the sync state 2 times:
1. `!R_SYNCING` [here](d08d7f13b4/src/server/replica.cc (L427C28-L427C37))
2. And only later to `R_SYNC_OK` (meaning `stable_sync`) [here](d08d7f13b4/src/server/replica.cc (L221))

This is easy to reproduce by adding a sleep right after the set of state to `ACTIVE`, either before or after the flipping of `R_SYNCING` (with different returned states).

BTW without that added sleep I was not able to reproduce, having tried 1000s of times in various configurations.

We could change the order of things such that we first change `state_mask_` and only then switch state from `LOADING` to `ACTIVE` (which is probably the right thing to do), but that would require a subtle refactor, as we change these in a couple of places.

But we should keep in mind that this has no effect on users. So a simple sleep on the test side should fix this fairly well.
2023-11-02 13:09:42 +02:00
Kostas Kyrimis
d08d7f13b4
fix(regTests): can't execute command while loading on snapshots (#2110) 2023-11-02 12:17:08 +02:00
Shahar Mike
1491bf4cfe
fix(server): Do not return empty array after expiration (#2104)
Fixes #2102
2023-11-02 08:36:58 +02:00
Yue Li
00f1e3d578
feat(server): perform eviction upon memory pressure in cache mode (#2084)
* fixes #1936

Eviction Implementation
This patch provides a very simple eviction implementation for the interface mentioned above. In my opinion, the eviction algorithm approximates an LRU policy given that normal buckets always store the most recently accessed data while stash buckets are holding less active data.

The algorithm first selects a small set of segments as eviction targets. Starting from the last slot of the last stash bucket in each of the segments, we walk backward to evict key-value pairs stored in each visited slot. The eviction stopped either when a target memory release goal or the max number of evicted key-value pairs is reached. Therefore, we can upper bound the eviction time through the following two parameters that can be set when DF starts.  Note that these two parameters could be retrieved and changed by user through CONFIG GET and CONFIG SET commands.

---------

Signed-off-by: Yue Li <61070669+theyueli@users.noreply.github.com>
2023-11-01 11:11:27 -07:00
Shahar Mike
ecb2703626
doc(README): Explain how to use env var flags (#2096) 2023-11-01 08:15:11 +02:00
zixuan zhao
05919efcbd
feat: Add GEOSEARCH support (#2070)
Signed-off-by: azuredream <zhaozixuan67@gmail.com>
2023-10-31 12:22:04 +02:00
Kostas Kyrimis
7b71b728c7
fix: small races on config registry and maxclients (#2078)
* fix small data race with maxclients
* make config::set an atomic operation
2023-10-31 09:26:15 +02:00
Vladislav
b403416be0
chore: raise pipeline squashing limit (#2095)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-31 00:33:32 +03:00
Roman Gershman
8a65aec805
chore: help users to fix a mistake of setting quotes in the flagfile (#2092)
* chore: help users to fix a common mistake of setting quotes in the flagfile

Specifically, the confusion is often around the cron expression.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-30 22:59:00 +02:00
Vladislav
39c1827fa7
fix(transaction): Reset reverse index in multi-tx (#2086)
* fix(transaction): Reset reverse index in multi-tx

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-30 17:22:35 +03:00
Kostas Kyrimis
84744a4004
fix(ReplyGuard): set member variable on construction and remove unused (#2082)
* set member variable to point to the reply builder
* remove redundant checks
* import missing signal in instance.py
2023-10-30 13:54:27 +02:00
Roman Gershman
967c6e0f6e
chore: improve pytest ux (#2088)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-30 09:01:23 +02:00
iko1
ac170748fb
feat(acl): add config set for acllog_max_len (#1979) 2023-10-29 18:17:02 +02:00
Kostas Kyrimis
1538f66a35
fix(AclFamily): renaming commands and subcommands (#2076)
* fix renaming ACL commands
* fix ACL subcommands to be treated as such. For example: ACL list would print all ACL subcommands. Now it only prints ACL
* add tests
2023-10-29 18:01:37 +02:00
ashotland
88b4e7dd31
fix(facade): Avoid check on getsockopt SO_INCOMING_NAPI_ID (#2091)
https://github.com/dragonflydb/dragonfly/issues/2090

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-10-29 16:57:51 +02:00
y9rabbito
c506e4ca6e
Add number of threads to INFO (#2085)
* Add number of threads to INFO

* Make the changes for the number of threads suggested by a maintainer

* Move thread_count after tcp_port

* fix the whitespace issue

* fix: whitespace

Signed-off-by: Roman Gershman <roman@dragonflydb.io>

---------

Signed-off-by: y9rabbito <66154871+y9rabbito@users.noreply.github.com>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Roman Gershman <roman@dragonflydb.io>
2023-10-29 15:30:42 +02:00
Vladislav
04cd2ff3f9
fix(search): Support indexing array paths (#2074)
* fix(search): Support indexing array paths

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>


---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-29 15:14:23 +03:00
Roman Gershman
47d92fb010
fix: Correctly grow dense_set in the Reserve call (#2087)
Fixes #2066

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-29 08:39:33 +02:00
Shahar Mike
502efd80b2
fix(server): Correctly set expiration from Lua scripts (#2080)
We used to set `time_now_ms_` only in the non-squashed execution path.

Fixes #2034
2023-10-27 13:13:47 +03:00
Vladislav
474ea5137a
fix(replica): fix replica reconnect handing (#2068)
* fix(replica): fix replica reconnect handing

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-27 11:12:55 +03:00
Kostas Kyrimis
af622f6a52
fix(requirements): conflicting dependencies redis and redis-om (#2079) 2023-10-27 09:18:49 +03:00
Kostas Kyrimis
b655fc7415
chore(reply_builder): add dcheck that each command invocation has rep… (#2067)
* chore(reply_builder): add dcheck that each command invocation has replied
2023-10-26 19:44:32 +03:00
Kostas Kyrimis
1961ff1063
fix(docs): add missing libstdc++-static dependency info (#2077) 2023-10-26 19:04:56 +03:00
Andy Dunstall
8f28a3826b
feat(aws): add web identity provider (#2041)
chore: update helio
2023-10-26 09:33:08 +00:00
Shahar Mike
424c65b4e5
fix(bptree): Reverse iteration (#2075)
Co-authored-by: Roman Gershman <roman@dragonflydb.io>
2023-10-25 20:07:57 +00:00
Shahar Mike
b2e989a4fb
fix(server): Fix crash when connection uses multiple lua scripts (#2073) 2023-10-25 19:44:09 +00:00
Kostas Kyrimis
67b8908805
chore(server-family): do not log SETINFO (#2065)
* chore(server-family): do not log SETINFO

* address gh comments
2023-10-25 18:15:00 +03:00
adiholden
254fb2dd5a
feat(server): add memory stats for snapshot save (#2072)
* feat(server): add memory stats for snapshot save

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-10-25 17:36:10 +03:00
Vladislav
5eed2bfe11
fix(search): Persist field flags (#2069)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-25 13:22:40 +03:00
Uku Loskit
e9427dbbbc
feat: Implement options for EXPIRE command (#2051)
Add NX, XX, LT, GT options to EXPIRE, EXPIREAT, PEXPIRE and PEXPIREAT

Signed-off-by: Uku Loskit <ukuloskit@gmail.com>
2023-10-25 11:26:33 +03:00
Roman Gershman
eefd0c7808
chore: add more debug info if a deadlock is caught in unit tests (#2062)
Addresses #2056

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-24 18:15:00 +03:00
Andy Dunstall
1a813ce1b7
feat(aws): add https support (#2061) 2023-10-24 11:31:05 +01:00
Roman Gershman
dc025e5f94
fix: inject our own parser for slowlog get (#2059)
Also adjust debug logs to be less verbose.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-24 11:02:51 +03:00
Andy Dunstall
124bafc06b
feat(tls): support runtime tls reconfig (#2047)
* feat(tls): add tls reconfig

* feat(config): error if multiple config params given

* tls: move ctx ref to connection
2023-10-23 16:35:39 +00:00
Roman Gershman
3095d8a168
feat: add 'memory decommit' command (#2058)
This command forces the memory manager to decommit memory pages back to the OS.
In addition, fixed some positional bugs in "memory malloc-stats"

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-23 16:49:00 +03:00
Kostas Kyrimis
dd2cb1def1
fix(regTests): properly handle other error codes on timeouts (#2057) 2023-10-23 16:35:29 +03:00
Roy Jacobson
313501d987
fix(sock): Use the updated cancellation cb interface. (#1940)
* fix(sock): Use the updated cancellation cb interface.

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-23 13:08:06 +03:00
Vladislav
67bb3970be
chore(search): Add exclusive range option (#2055)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-23 13:07:40 +03:00
Roman Gershman
15f54be762
chore: measure rss memory and track its peak (#2054)
Up until know we did not have cached rss metric in the process.
This PR consolidates caching of all values together inside the EngineShard periodic fiber
code. Also, we know expose rss_mem_current that can be used internally for identifying
memory pressuring periods during the process run.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-22 19:01:40 +00:00
Roman Gershman
d9cb7453fb
wrap dragonfly_test with gdb inside a CI (#2050)
chore: run dragonfly_test with epoll under gdb

Also, update helio that provide a stacktrace under musl libc (alpine linux).
This version of helio updates absl version as well.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-22 20:05:27 +03:00
Vladislav
2cb7d30603
fix: skip setting tcp_nodelay for unix domain sockets (#2033)
* fix handling of unix domain sockets

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-22 11:00:51 +03:00
Roman Gershman
83d5b849a3
fix: localize timeout in test_cancel_replication_immediately test (#2048) 2023-10-22 08:44:00 +03:00
Vladislav
9e8d886ce9
chore(search): add redis-om test (#2049)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-21 14:22:04 +03:00
Roman Gershman
215c037e41
feat: implement fieldttl for the hash family (#2040)
Fix some corner case bug with set family as well.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-20 21:51:24 +03:00
Vladislav
4a2dd30886
fix: Don't crash on reaching hnsw capacity (#2046)
* fix: Don't crash on reaching hnsw capacity

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-20 19:36:52 +03:00
Kostas Kyrimis
1d02e12ad1
chore: call debug stacktrace on SIGUSR1 (#2012)
* add macro to install a signal handler that prints the contents of debug stacktrace on SIGUSR1
* add this on regTests
2023-10-20 10:50:55 +03:00