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

1632 commits

Author SHA1 Message Date
Vladislav
27dcec38ee
fix(json): fix json dot path (#2186)
* fix(json): fix json dot path

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

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-17 22:32:16 +03:00
Kostas Kyrimis
c4cae58fc8
chore(server_family): add missing field used_memory_peak_human in command info (#2184)
* add missing field used_memory_peak
2023-11-16 14:52:58 +02:00
adiholden
c95f4961be
fix(server): client pause fix on pipeline squash (#2180)
* fix(server): client pause fix on pipeline squash

allow squashing commands on pause
move await on client pause inside InvokeCommand - this way all flows of command invoke will read pause state

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-11-16 13:30:02 +02:00
adiholden
b61d07d2c1
regression: skip client pause test utill we fix the bug (#2177)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-11-15 16:31:45 +02:00
adiholden
764d542d42
fix(server): fix build after merge AwaitCurrentDispatch (#2176)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-11-15 11:37:36 +03:00
Vladislav
89c821b438
chore(facade): Introduce AwaitCurrentDispatches (#2156)
* chore(facade): Introduce AwaitCurrentDispatches

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

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-15 10:24:08 +03:00
Roy Jacobson
c3a2da559e
feat(server): Implement CLIENT PAUSE (#1875)
* feat(server): Implement CLIENT PAUSE

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-11-15 08:56:49 +02:00
Borys
1ec1b997a0
feat: add support for sticky keys in rdb #251 (#2166)
* feat: add support for sticky keys in rdb
2023-11-14 14:02:14 +02:00
Shahar Mike
87ee4f486c
fix(stats): Do not crash upon issuing mem stats (#2169)
* fix(stats): Do not crash upon issuing `mem stats`

The reason for the crash is that we can't use a mutex while iterating
connections. It uses a non-Fiber `Await()`, and it also has a fiber
atomic guard.

Instead use the common trick of allocating per-thread data and aggregate
afterward.

* Use pool size
2023-11-14 13:12:13 +02:00
Kostas Kyrimis
09415c4f57
chore(tls): add tls config test for ca_dir (#2152)
This PR introduces a test case for TLS with `ca_dir`. First, we
did not have any tests for this case. Second, using `ca_dir` requires
to call `c_rehash` on the directory before it is loaded by DF. We
did not have this use case anywhere and therefore we thought there was
a bug when we used `ca_dir` only to find out that we need to call
`c_rehash` on the directory before we load the certificates. Now,
both a test and a use case are properly documented

* add missing test for ca_dir
* use rehash to properly show how to load ca directories instead of
  files
2023-11-13 14:11:14 +02:00
Shahar Mike
5ca2be1185
feat: Memory stats (#2162) 2023-11-13 13:58:29 +02:00
Vladislav
4b685aa809
fix(connection): Clear dispatch queue before pipeline squashing (#2163) 2023-11-13 12:08:21 +03:00
Vladislav
46292968ad
fix(search): Fix replication (#2159)
* fix(search): Support replication

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

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-13 11:58:54 +03:00
Nico Coetzee
cc064a2582
Incorrect link to helm chart packages (#2161)
Fixed link and added some formatting
2023-11-13 07:19:08 +00:00
Vladislav
3b458c21ee
chore: dragonfly_connection fixes (#2160)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-12 12:48:56 +03:00
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