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

286 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
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
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
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
Vladislav
5eed2bfe11
fix(search): Persist field flags (#2069)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-25 13:22:40 +03: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
Kostas Kyrimis
dd2cb1def1
fix(regTests): properly handle other error codes on timeouts (#2057) 2023-10-23 16:35:29 +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
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
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
Kostas Kyrimis
64841efeed
chore(regTests): print logs when regTests timeout (#2031)
* add a python script to print the most recent log
* if CI timeouts, print the most recent log
* replace global timeout with timeout command
* upload all logs on failure()
* print uid + port + the log files for each df instance
2023-10-20 10:50:19 +03:00
iko1
954e5a0a80
feat(acl): add config set for aclfile (#1978) 2023-10-19 10:15:38 +00:00
Roman Gershman
1cb8be26ea
chore: remove .DS_Store file (#2025) 2023-10-15 19:27:07 +03:00
Uku Loskit
6a75c6ddc5
feat: Implement slowlog (#1956)
Implement slowlog

Signed-off-by: Uku Loskit <ukuloskit@gmail.com>
2023-10-13 23:39:35 +03:00
Kostas Kyrimis
76a030b1a7
chore(regTests): add basic module logging and print when tests fail (#2005)
* add vmodule level 1 logging for df instances
* print logs when df instance fails to stop
2023-10-12 14:38:35 +03:00
Shahar Mike
b1bd2103d7
opt(server): If unspecified, use num_shards == proactor_threads (#1998)
* opt(server): If unspecified, use num_shards == proactor_threads

* Use same config for tests, per Roman's request
2023-10-10 14:12:39 +03:00
Kostas Kyrimis
cbba6f4e11
fix(acl/admin_port): skip acl validation on admin port (#1997)
* skip all acl related functionality on admin port
2023-10-10 08:28:07 +03:00
Kostas Kyrimis
5471827448
update(requirepass): behave as redis requirepass (#1996)
* requirepass also updates ACL default user password
* update config set requirepass to include the new behaviour
* add tests
* fix non existent default user when loading empty files
2023-10-09 16:34:42 +03:00
Andy Dunstall
2d28b48481
feat(aws): add s3 awsv2 (#1929)
* feat(aws): add s3 awsv2

* feat(aws): add s3 snapshot test

* feat(aws): disable ec2 metadata by default

* feat(aws): add s3 disable payload signing flag

* chore: update helio

* fix: fix requirements.txt

* feat(s3): update sign payload flag

* chore: update helio
2023-10-06 10:24:56 +01:00
Kostas Kyrimis
0c1402c4ab
fix(regTests): test_cancel_replication_immediately races (#1990) 2023-10-06 09:38:14 +03:00
Kostas Kyrimis
e98d5e60c8
fix(regTests): adjust small network buff test (#1991)
* Seeder runs infinitely
2023-10-05 16:37:40 +03:00
Kostas Kyrimis
8b7a43d214
fix(Listener): skip auth when requirepass is empty on http (#1985)
* Fix a small bug on http when username was required even if requirepass was empty
2023-10-03 19:56:19 +03:00
Vladislav
1ea0c39d6a
fix(server): Fix async lua (#1982)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-03 16:13:38 +03:00
Vladislav
20b924f9d5
fix(regtests): Reduce load on redis replication test (#1984)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-03 12:28:42 +03:00
Kostas Kyrimis
945d3a39e4
chore(Http): change authed username to default and skip auth on metrics (#1950)
* Update Http auth with username default instead of user
* skip auth for /metrics page
* add/improve tests
* fix a bug with admin port requiring auth on http even if nopass was set
* update helio ref
* update listener class to contain its respective Role
* fix http init to only include admin and main listener
2023-10-03 10:45:37 +03:00
Kostas Kyrimis
59dd48d47a
fix(RegTests): fix replication test_network_disconnect_active_stream (#1980)
* The issue was similar with test `network_disconnect_small_buffers` but this time the debug build could be slow enough for the replication to not finish. As a consequence, by the time the test reached the assertion, the log did not contain the expected output.
2023-10-02 17:35:25 +03:00
adiholden
84d4ba4d69
chore(regression): test bptree on regression pytests (#1963)
* chore(regression): test bptree on regression pytests

1. stop passing the flag use_zset_tree as it is true on default
2. fix ci test to run replication tests
3. change replication tests seeder to sometimes add more than 128 values
   to zset to test the pbtree impl

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-10-02 14:07:50 +00:00
Roman Gershman
57441f9863
chore: Print useful info when printing DflyInstance objects (#1977) 2023-10-02 12:02:46 +03:00
Vladislav
bc48bed6ad
fix(regtests): Colored per-instance log (#1971)
* fix(regtests): Colored per-instance log

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-02 10:36:41 +03:00
Andy Dunstall
e6b8cd1d76
feat(cmd): add restricted commands flag (#1967) 2023-09-29 16:16:06 +01:00
Kostas Kyrimis
ba4eba991d
fix(regTests): adjust network disconnect small buffer to pass on (#1970) 2023-09-29 16:50:01 +03:00
Roy Jacobson
7ad29ab919
fix(regtests): Limit infinite loop in replication_test (#1961) 2023-09-28 11:45:03 +03:00
Roy Jacobson
5c9c9255d2
chore: Small refactor of DflyInstance (#1951)
* Move to its own file
* Unify self.args and self.params.args earlier so it can be inspected.
2023-09-28 10:11:11 +03:00