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

1617 commits

Author SHA1 Message Date
Vladislav
564e38c05c
chore: lower takeover test load, add comments (#2151)
* chore: lower takeover test load, add comments

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-12 12:08:05 +03:00
Roman Gershman
4201ac416e
chore: remove Command step argument (#2150)
It will be represented via INTERLEAVED_KEYS option.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-10 19:10:56 +02:00
Vladislav
60fb9feec8
fix(tests): Fix flaky cluster test (#2158)
Fixes flaky cluster family test
2023-11-10 15:31:57 +00:00
Borys
587660f7f5
feat: add SRANDMEMBER and ZRANDMEMBER (#2148)
* feat: add SRANDMEMBER and ZRANDMEMBER

* fix: fix SRANDMEMBER and ZRANDMEMBER commands behaviour

* fix: fix type and remove extra flag
2023-11-10 12:01:37 +02:00
Kostas Kyrimis
5381746158
fix(regTests): increase cancel replication test timeout (#2143)
* increase timeout on cancel replication immediately 
* reduce the amount of commands run to 100 in the test
2023-11-08 23:00:00 +03:00
Shahar Mike
76381e6bc7
doc: How to bind to all IPv4 IP addresses (#2145) 2023-11-08 10:50:20 +00:00
Vladislav
0da488d99e
chore(eval): Don't crash on unsupported script commands (#2138)
* chore(eval): Don't crash on unsupported script commands

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-08 10:21:52 +02:00
Weihan Li
6e6aca0978
docs(readme): Fix README.zh-CN benchmark link (#2117)
docs: fix README.zh-CN benchmark link

Signed-off-by: Weihan Li <weihanli@outlook.com>
2023-11-07 15:26:57 +02:00
Vladislav
b7cbdca799
chore(search): Fix expiry test (#2136)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-07 13:00:52 +03:00
Vladislav
58f2806171
chore(acl): Fix STICK flags (#2140)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-07 12:17:26 +03:00
Borys
c2536e481e
feat:add new macros {Y}, {m} and {d} to dbfilename flag (#2118)
* feat:add new macros {Y}, {m} and {d} to dbfilename flag
* refactor: using last_modified metadata instead of filename to find the latest snapshot
2023-11-07 10:11:03 +02:00
zixuan zhao
6472bcffc4
Add GeoRadiusByMember support (#2107)
* Add GeoRadiusByMember support

Signed-off-by: azuredream <zhaozixuan67@gmail.com>

---------

Signed-off-by: azuredream <zhaozixuan67@gmail.com>
2023-11-07 07:43:51 +02:00
romange
5f03fa4380 chore(helm-chart): update to v1.12.1 2023-11-06 17:46:48 +00:00
Vladislav
821884e333
chore(search): Extend FT.INFO (#2133)
* chore(search): Add index definition info to ft.info

* chore(search): Add flags to ft.info

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

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-06 16:18:13 +03:00
Shahar Mike
1bb27dd448
fix(rename-command): Fix subtle UB when renaming commands (#2132)
In practive, commands larger than SSO would not work.

Fixes #2131
2023-11-06 13:31:23 +02:00
Shahar Mike
1f4b1e4c6c
chore: Enable unit-tests in CI (#2129)
* chore: Enable unit-tests in CI

* Update helio
2023-11-06 10:44:02 +00:00
Kostas Kyrimis
f68e1ef7e3
fix(memcached): parsing multi key get command (#2122)
* remove limit of 8 keys per command
* refactor (small) of the parsing logic
* add test
2023-11-06 11:27:46 +02:00
Shahar Mike
efeae543a1
fix(unittest): Init with dbfilename= before attempting to save (#2127)
This is a pretty recent regression.
2023-11-06 08:53:28 +02:00
Shahar Mike
7e23c14c35
fix(DenseSet): Rename Size() to UpperBoundSize() and add SizeSlow() (#2130)
Then use the right version (hopefully) in the right places.

Specifically, this fixes a serialization bug, where we could send
malformed responses when using `UpperBoundSize()` to write array length.
2023-11-06 08:52:08 +02:00
Shahar Mike
f809fb04bc
fix(server): Do not crash HRANDFIELD if some/all elements expired (#2113)
* Better API

* O(n) comments
2023-11-05 19:11:30 +02:00
Shahar Mike
2e5cccc2fb
fix(unittest): Fix regression to sticky-eviction unittest (#2128) 2023-11-05 17:36:36 +02:00
Roman Gershman
c7db025a48
feat: expose fiber responsiveness metrics (#2125)
Should allow track caches where Dragonfly is not responsive to I/O
due to big CPU tasks. Also, update the local grafana dashboard.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-05 16:56:33 +02:00
Shahar Mike
b9781c4903
fix(test): Don't access null pointer (#2126)
This caused a UBSan warning to be printed in test `DflyEngineTest.Bug207`

```
/usr/include/c++/11/bits/stl_vector.h:1046:34: runtime error: reference binding to null pointer of type 'struct value_type'
```
2023-11-05 13:31:28 +02:00
Kostas Kyrimis
2baadd1e90
fix(acl): case insensitive parsing from files and serialization format (#2123)
* replace > with # for acl files
* replace ACL SETUSER with USER for acl files
* add case insensitive parsing for acl files
* update tests
2023-11-05 11:43:11 +02:00
Roman Gershman
5c6aad20c1
fix: local grafana dasboard (#2124)
The dashboard used `dragonfly_up` metric to boostrap itself
but this metric does not exist anymore. I replaced it with `dragonfly_version`
In addition, the exported format changed slightly because I used the
recent grafana version to export.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-04 18:34:19 +00:00
Pulkit Batra
dafc63f0de
docs(contributing): Fix typo in CONTRIBUTING.md (#2119)
fixed typo in CONTRIBUTING.md

Signed-off-by: Pulkit Batra <95132680+PulkitBxtra@users.noreply.github.com>
2023-11-03 19:42:01 +00:00
Roman Gershman
7aa3dba423
chore: use decode_responses when creating a redis client (#2109)
* chore: use decode_responses when creating a redis client

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-03 11:00:26 +02:00
Borys
2f39e89189
fix: add ability to set snapshot_cron flag during runtime (#2101)
* fix: add validating for snapshot_cron flag during runtime
* refactor: move warning log to upper level
2023-11-03 10:10:16 +02:00
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