1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-15 17:51:06 +00:00
Commit graph

197 commits

Author SHA1 Message Date
adiholden
ba8adf7bde
skip test_multidim_knn (#1834)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-09-10 08:35:42 +00:00
Kostas Kyrimis
fc6b7e5f9a
fix(regression-tests): correct path for acl files (#1829) 2023-09-09 11:59:17 +03:00
Kostas Kyrimis
164b045505
fix: regression tests for acl family test (#1826) 2023-09-08 19:57:09 +03:00
Kostas Kyrimis
48488c5682
feat(AclFamily): load/store aclfile (#1820)
* add ACL LOAD
* add ACL SAVE
* add --aclfile command
2023-09-08 14:20:06 +03:00
Vladislav
e69f18286b
feat(search): HNSW (#1799)
* feat(search): HNSW

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-08 09:57:18 +03:00
Kostas Kyrimis
d1002842b8
chore(AclFamily): Move some of the regressions tests to unit and add (#1816)
* move error handling tests from regression to unit
* move ACL LIST regression to unit test
* move AUTH regression to unit test
* move ACL WHOAMI regression to unit test
* add unit tests for SETUSER/DELUSER (so they run on every PR)
* add unit tests for all ACL categories
2023-09-06 16:03:22 +00:00
Roy Jacobson
502f76fada
Enable authentication for the HTTP interface. (#1792) 2023-09-04 15:18:57 +03:00
Vladislav
f1d9ab30ee
feat(search): Query parameters (#1768)
* feat(search): Query parameters

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-03 23:08:25 +03:00
Kostas Kyrimis
196650a39d
chore(AclFamily): disable flaky tests (#1791) 2023-09-03 09:23:14 +00:00
Kostas Kyrimis
846d421d25
fix(AclFamily): setuser interleaved signed categories update (#1790) 2023-09-03 09:02:32 +00:00
Kostas Kyrimis
68fa3f420b
feat(AclFamily): add acl whoami command (#1774)
* add acl whoami
* add tests
2023-09-01 21:23:01 +03:00
Kostas Kyrimis
6706707585
feat(AclFamily): add acl deluser (#1773)
* add acl deluser command
* add tests
2023-09-01 16:12:02 +00:00
Kostas Kyrimis
9ca7dba143
fix(AclFamily): stream acl updates via dispatch queue in connection (#1786)
There was a bug on updates of the acl categories when squashing was used. Basically, the parent context could be accessed in parallel by the "stub" contexts causing a dreaded data race on the update.

This is fixed by adding a new AclUpdateMessage at the front of the dispatch queue of the connection.
2023-09-01 15:40:50 +00:00
Vladislav
eaedc96dc5
fix(search): return whole json documents (#1782)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-01 12:50:11 +03:00
Kostas Kyrimis
4350cf35d7
fix: failing memcached regression test (#1778) 2023-08-31 12:59:50 +03:00
Roman Gershman
3829e3691e
chore: move rdb save related logic into auxillary file (#1769)
1. No logic was changed during refactoring.
2. Flipped the flag to run regression tests for now own with zset_tree=on

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-30 16:41:17 +03:00
Kostas Kyrimis
7c43cbf2b5
feat: add validation of acl users (#1743)
* add validation for categories
* add tests
2023-08-29 18:52:46 +03:00
Kostas Kyrimis
1855c1cd54
fix: broken memcached error reporting (#1741)
* fix DispatchCommand error reporting when memcached protocol is used (one example is when we use SET command on the replica -- previously we crashed now we properly report an error)
* SendError(ErrorReply) moved to SinkReplyBuilder from RedisReplyBuilder
* SendError(OpStatus) moved to SinkReplyBuilder from RedisReplyBuilder
* added tests for SendError(ErrorReply) in RedisReplyBuilder
2023-08-28 17:28:42 +00:00
Roman Gershman
af434cf710
feat: implement CONFIG GET command (#1751)
* feat: implement CONFIG GET command

The command returns all the matched arguments and their current values.
In addition, this PR adds mutability semantics to each config - whether it can be
changed at runtime.

Fixes #1700

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

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-28 19:26:38 +03:00
Roy Jacobson
ed845fe526
feat(server): Support limiting the number of open connections. (#1670)
* feat(server): Support limiting the number of open connections.

* * Update helio after the small fix was merged to master
* Don't limit admin connections (and add a test case)

* Resolve CR comments
2023-08-27 11:30:16 +03:00
Roman Gershman
6dd51de9fe
fix: fix memcache bugs (#1745)
1. If the first request sent to the connection is large (2kb or more)
   Dragonfly was closing the connection.
2. Changed server side error reporting according to memcache protocol:
   https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L172
3. Fixed the wrong casting in DispatchCommand.
4. Remove practically unused code that translated opstatus to strings.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-27 11:29:01 +03:00
Kostas Kyrimis
50545fc176
feat(AclFamily): add AUTH for acl members (#1732)
* Extends AUTH command to authenticate ACL users
* Add tests
2023-08-25 18:56:15 +03:00
Vladislav
3520697b22
fix: fix search test (#1739)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-25 10:01:36 +03:00
Vladislav
84871b8dce
feat: search index persistence (#1721)
* feat: WIP search index persistence

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

* Update src/server/search/doc_index.cc

Co-authored-by: Kostas Kyrimis  <kostaskyrim@gmail.com>
Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>

* fix: foxes

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

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
Co-authored-by: Kostas Kyrimis <kostaskyrim@gmail.com>
2023-08-24 13:41:10 +03:00
Kostas Kyrimis
bd87fb75fa
feat(AclFamily): add acl setuser command (#1725)
* Add `ACL SETUSER` command
* Add tests
2023-08-24 13:24:18 +03:00
Kostas Kyrimis
7f89bf37d8
fix(AclFamily): commands parsing and error handling (#1726)
* Fixed broken ACL command (prev df crashed)
* Fixed broken ACL LIST STR (now prints error)
* Added tests
2023-08-23 14:23:41 +03:00
Roy Jacobson
331e6a4d47
chore: Mark slow pytests as 'slow' so they can be excluded. (#1720) 2023-08-23 13:04:49 +03:00
Kostas Kyrimis
898061d738
feat(AclFamilly): add acl list command (#1722)
* Add acl-family source and header
* Add `ACL LIST` command
* Add a simple test to check the default user
2023-08-22 15:33:14 +00:00
Vladislav
ac79167530
fix: Add small timeout to monitor (#1718)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-21 10:20:43 +00:00
Vladislav
e0f3684e5d
feat: json paths in search (#1695)
* feat: json paths in search

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
Co-authored-by: Roy Jacobson <roi.jacobson1@gmail.com>
2023-08-18 15:40:59 +03:00
Vladislav
c65b9cf63d
fix: Fix squashing, pytest arg formatting (#1712)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-18 09:28:19 +03:00
Vladislav
4fbd0e38dd
feat: Pipeline squashing (#1619)
* feat: Pipeline squashing

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
Co-authored-by: Kostas Kyrimis <kostaskyrim@gmail.com>
2023-08-17 16:06:48 +03:00
Vladislav
71fa2f275e
fix: MONITOR now works for multi transactions (#1675)
* fix: fix monitoring for multi transactions

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-17 12:50:16 +03:00
talbii
16c2353faf
introduce --replicaof flag (#1583)
* introduce `--replicaof` flag

Closes #1381.

The behvaiour of `--replicaof` is similar to `REPLICAOF`. On startup, the instance continuously attempts to connect to master. Stop using the normal `REPLICAOF NO ONE` command.

The flag expects format `<IPv4/host>:<port>` or `[<IPv6>]:<port>`.

---------

Signed-off-by: talbii <ido@dragonflydb.io>
Signed-off-by: talbii <41526934+talbii@users.noreply.github.com>
2023-08-09 14:42:08 +03:00
Vladislav
7f1a2d9e38
fix(pytest): Raise exception if instance.stop timed out (#1660)
fix(pytest): Raise if instance.stop timed out

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-07 19:10:15 +03:00
Vladislav
279d7cc068
feat: FtList, FtDropIndex and FtInfo (#1649)
* feat: FtList, FtDropIndex and FtInfo

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-06 22:01:58 +03:00
Dor Avrahami
0b6c0bbe53
feat: support for cron expressions based snapshot (update). (#1620)
Requested by #1590.
Introducing a new flag --snapshot_cron, enabling users to use cronjob expressions to time snapshot saves.
Cronjob expressions are parsed using a third party library croncpp.
This PR continues #1599, updating cron expressions to crontab style,
up to minutes resolution instead of seconds.

Signed-off-by: Dor Avrahami <da19965@gmail.com>
2023-08-02 12:58:45 +03:00
Shahar Mike
3b0bd212f4
fix(test): Fix failing tests. (#1612)
Solution is to wait until snapshot is ready, instead of hard coding a
sleep schedule. Also don't reuse files by other test cases.
2023-08-01 08:30:17 +00:00
Dor Avrahami
977fc18e25
feat: support for cron expressions based snapshot. (#1599)
Introducing a new flag `--snapshot_cron`, which enables users
to use cron expressions to time snapshot saves.

Signed-off-by: Dor Avrahami <da19965@gmail.com>
2023-07-31 20:26:01 +03:00
Roy Jacobson
4c85d5825d
tests: Add a password to TLS configurations (#1603)
Add a password to TLS configurations
2023-07-31 08:48:36 +00:00
adiholden
3ed0bb480f
Fix(regression test): fix test_flushall_in_full_sync (#1597)
* Fix(regression test): fix test_flushall_in_full_sync

The bug: the test checks the replication using role command on replica
The replica updates the status to full sync when starting the full sync
flow, but actually the master did not start snapshoting yet.
The fix: check the status using role command on master, because master
updates the status only after snapshoting started.

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-07-31 09:24:37 +03:00
Roy Jacobson
85619e0010
sec: Adjust flag validation for TLS. (#1582)
* sec: Adjust flag checks when using TLS.

* Trust default certificates if no specific roots are given

* Add regression tests for the different scenarios

* Validate that client connections work as well
2023-07-30 19:24:39 +02:00
adiholden
57dc42530e
Fix(regression test): test_tls_replication (#1580)
The test fails sometimes when starting master after killing it.
The reason for this is that OS did not release port untill we started
master again.
The fix - adding sleep after kill
After we will have randomly selected ports on pytest we can remove this
sleep.

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-07-23 10:27:12 +03:00
Kostas Kyrimis
9698d6fea2
test(replication): add admin port replication tests (#1561) 2023-07-20 14:35:41 +03:00
Kostas Kyrimis
078d152ae0
feat: add replication over tls (#1525)
1. Introduces `tls_replication` flag to allow tls connections for replicas
2. Add pytests
2023-07-19 18:21:46 +00:00
Kostas Kyrimis
7944af3c62
feat: Add black formatter to the project (#1544)
Add black formatter and run it on pytests
2023-07-17 13:13:12 +03:00
adiholden
c27fa8d674
fix(regression test): fix in shutdown and replication pytests (#1530)
* fix(regression_test): fix in shutdown and replication pytests

- skip test_gracefull_shutdown test
- fix test_take_over_seeder test:
    bug: the dbfilename was not unique, therefore between different runs the server reload
    the snapshot of the last test run and this failed the test.
    fix: use random dbfilename
- fix test_take_over_timeout test:
    bug: REPLTAKEOVER timeout was not small enough for opt dfly build
    fix: decrease timeout

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-07-11 09:56:20 +03:00
Kostas Kyrimis
77a223d36d
fix: add tls-ca-cert-file and tls-ca-cert-dir flags to allow tls certificate validation (#1515)
1. add tls-ca-cert-file flag
2. add tls-ca-cert-dir flag
3. enables redis-cli to connect over tls without --insecure flag by properly validating certificate wtih CA
2023-07-11 08:28:18 +03:00
Shahar Mike
a6745850ab
Fix regression test failures. (#1529)
The issue was that, sometimes, the ID generated for one of the nodes
contained the slot ID that was used in the test (either 5259 or 5260).
This caused the test to replace the "slot" part of the id, which in turn
caused the node to think that it no longer owns any slot.
2023-07-10 10:59:58 +03:00
Roy Jacobson
3904a4f628
Fix regression test failures on old Python versions (#1521)
Signed-off-by: adiholden <adi@dragonflydb.io>
Co-authored-by: adiholden <adi@dragonflydb.io>
2023-07-06 15:27:39 +03:00