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

406 commits

Author SHA1 Message Date
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
Kostas Kyrimis
949cedf66c
fix(AclFamily): do not allow to delete default user (#1954)
* do not allow to delete default user
* upon loading an acl file, if default does not exist create them
* add test
2023-09-28 09:22:45 +03:00
Kostas Kyrimis
b82825cd6c
fix: test_cancel_replication_immediately (#1942)
* Give enough time to get replication canceled when the CI server is under heavy load
2023-09-27 17:56:26 +03:00
Roy Jacobson
ab903612f1
fix(regtests): Bind to 127.0.0.1 and not localhost (#1937)
* fix(regtests): Bind to 127.0.0.1 and not localhost

* Split start into start/serve
2023-09-27 14:58:52 +03:00
Roy Jacobson
d50b492e1f
feat(replication): First iteration on partial sync. (#1836)
First iteration on partial sync.
2023-09-26 10:35:50 +03:00
Vladislav
fc0943989e
feat(search): return scores (#1870)
* feat(search): return scores

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-25 10:03:17 +03:00
Vladislav
bb77de7551
fix(regests): Fix port detection with gdb (#1922)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-24 15:42:31 +03:00
Vladislav
9ccdfb4bf1
fix(regtests): filter client setinfo from rewrite log (#1921)
Fix tests failing after client update to 5.0
2023-09-24 10:51:56 +03:00
Vladislav
d8b99dce93
chore(regtest): Update redis dependency (#1915)
* chore(regtest): Update redis dependency

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-23 10:06:21 +03:00
Vladislav
5bc069f37e
fix: Correctly persist vector indices (#1905)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-22 11:29:19 +03:00
Kostas Kyrimis
cfd83a66a2
fix(regression-tests): increase waiting delay for df startup (#1893) 2023-09-19 19:42:12 +03:00
Kostas Kyrimis
890761989c
feat(AclFamily): add acl log (#1865) 2023-09-18 20:10:53 +03:00
Roy Jacobson
1e61ec8114
chore: Add a context manager to DflyInstance so we don't forget to close them. (#1873)
* chore: Add a context manager to DflyInstance so we don't forget to close
them.

* Update tests/dragonfly/config_test.py

Co-authored-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roy Jacobson <roi.jacobson1@gmail.com>

---------

Signed-off-by: Roy Jacobson <roi.jacobson1@gmail.com>
Co-authored-by: Roman Gershman <roman@dragonflydb.io>
2023-09-18 13:52:56 +03:00
Roy Jacobson
74d78261fc
chore: Fix regression test after #1569 (#1872) 2023-09-18 12:26:18 +03:00
Roy Jacobson
b55316c0e6
tests: choose open ports randomally (#1569)
* Implement changes to the testing infrastructure to use random ports
* Use psutil to find out the random ports
2023-09-18 10:23:49 +03:00
Uku Loskit
7a5fe1adc1
fix: fix json.arrappend not allowing passing JSON objects (#1867)
Signed-off-by: Uku Loskit <ukuloskit@gmail.com>
2023-09-16 12:27:20 +03:00
Kostas Kyrimis
bbd4c6b636
feat(AclFamily): add acl commands (#1844) 2023-09-15 14:28:36 +03:00
Kostas Kyrimis
ff079f0af1
fix(ServerFamily): proper initialization of FileSnapshotStorage when replicaof flag is used (#1858)
* fix(ServerFamily): proper initialization of FileSnapshotStorage when
replicaof flag is passed
2023-09-15 09:00:56 +03:00
Andy Dunstall
a8f3764048
feat(tests): unset test DFLY env variables (#1856) 2023-09-13 18:24:48 +01:00
Aidarbek Suleimenov
04e88a1381
feat(server): Getting flags from the environment variables (#1810)
* flags from env variables

* querying environment vars

* remove includes

* refactor

* exit for unknown flag with DFLY_ prefix

* reflecting change in the test

* better tests

* refactor + new test case

* refactor test with inner class

* refactor

* revert back test flags as it might affect ci/cd

* fixing flags

* refactor

* remove includes

* refactor
2023-09-13 10:02:38 +00:00
Roman Gershman
99244b1049
Support 'databases' alias for CONFIG GET (#1849)
Fixes #1842

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-12 19:19:05 +03:00
Roman Gershman
02fff36e3e
Add build_rpm script and rpm spec (#1831)
Also, link stdlib++ and libgcc statically.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-12 10:42:06 +03:00
Kostas Kyrimis
684bf97ce6
fix(AclFamily): move acl test files to pytest (#1843)
* Fixes broken release build
* Moves acl test files to acl pytest
2023-09-12 09:38:58 +03:00
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
Kostas Kyrimis
15481b81ce
feat(replication): allow non-tls connections between replica and master on admin port #1419 (#1490)
1. Add new flag no_tls_on_admin_port
2. Add replication tests for no_tls_on_admin_port
2023-07-06 14:04:45 +03:00
Roy Jacobson
0f69d32b11
takeover: Cancel blocking commands (#1514)
* fix: Cancel blocking commands when performing a takeover

* Add some comments

* Make CancelBlocking a method of ConnectionContext

* add a small todo
2023-07-05 17:09:10 +02:00
Roy Jacobson
177a21b266
Fix a bug and add a timeout test for takeover. (#1512) 2023-07-03 16:46:38 +02:00
Roy Jacobson
4babed54d3
feat: Support atomic replica takeover (#1314)
* fix(server): Initialize ServerFamily with all listeners.

- Add a test for CLIENT LIST which is the visible result of this.

* use std move

* feat: Implement replicas take over

* Basic test

* Address CR comments

* Write a better test. Sadly it fails

* chore: Expose AwaitDispatches for reuse in takeover

* Ensure that no commands can execute during or after a takeover

* CR progress

* Actually disable the expiration

* Improve tests coverage

* Fix the dispatch waiting code

* Improve testing coverage and fix a shutdown snaphot bug

* don't replicate a replica
2023-07-02 16:11:28 +02:00
Roy Jacobson
52192e0596
fix(server): Initialize ServerFamily with all listeners. (#1485)
* fix(server): Initialize ServerFamily with all listeners.

- Add a test for CLIENT LIST which is the visible result of this.

* use std move
2023-07-02 10:01:54 +02:00
Vladislav
1ee0e30255
fix: disable prohibited eval in multi test (#1505)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-07-02 10:50:03 +03:00
Vladislav
cfca751848
feat: global eval in exec (#1443)
Enables execution of global lua scripts inside multi/exec transactions if the defualt script config enables global execution for scripts. This change is only a fix and does not provide any safeguards against other execution scenarios (namely enabling globality with script flags). In the future, the proper execution mode should be determined more carefully by inspecting the scripts to be executed

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Kostas Kyrimis  <kostaskyrim@gmail.com>
2023-07-01 22:12:05 +03:00
Kostas Kyrimis
542b9783b7
fix(regression): remove test case for info persistence (#1492)
The test case for checking is_loading == 1 is inherently racy because
the client can connect at any time before or after the dragonfly
instance loads the snapshot.
2023-07-01 11:57:54 +03:00
Kostas Kyrimis
3eaeef096c
fix: misspelled replication on pytest redis_replication (#1501) 2023-07-01 11:56:43 +03:00
Shahar Mike
5c11beb919
feat(cluster): Send flush slots cmd from masters to replicas. (#1484)
This fixes potential data diffs between master and replica upon slot moving

Fixes #1320
2023-06-28 22:04:51 +03:00
Roy Jacobson
cbe72e353d
fix: Increase the duration of the seeding in test_replication_info. (#1479) 2023-06-26 10:41:25 +03:00
Kostas Kyrimis
0670a81488
fix(regression): failing info persistence on snapshot pytests (#1473) 2023-06-23 16:04:44 +03:00
Kostas Kyrimis
10479a4fba
fix: failing assertion on snapshot regression tests when dbfly instance shuts down (#1463)
This PR is a temporary solution for clients that are not properly
removed from the connection pool triggering an active client assertion
during dragonfly instance shutdown
2023-06-22 13:47:36 +03:00
Roy Jacobson
0a7328f1e1
Expose replication lag metrics (#1400)
* feat(server): Expose lag metrics over prometheus.

---------

Signed-off-by: Roy Jacobson <roy@dragonflydb.io>
2023-06-22 11:12:41 +02:00
Vladislav
fea4e1dd4d
fix: rename memcache to memcacheD (#1461)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-22 11:55:20 +03:00
adiholden
98e84f804a
feat(regression github): send failed tests names to chat (#1459)
* feat(regression) : send failed tests names

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-06-22 09:47:12 +03:00
Kostas Kyrimis
99f3284910
feat(server): Add missing fields to INFO PERSISTENCE command (#1408) (#1438)
* Add loading field
* Add rdb_changes_since_last_save field
2023-06-21 23:35:36 +03:00
Vladislav
f25098bb98
fix: add numpy to regtests (neede for knn) (#1454)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-21 09:18:42 +03:00
Vladislav
a9d9b4935c
feat: Implement KNN interface (#1412)
Add external KNN interface

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-20 14:10:08 +03:00
Vladislav
6d4d740d6e
fix: Don't remove non-concluding tx from queue on ooo runs (#1427)
* fix: Don't remove non-concluding tx from queue on ooo runs

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-18 21:14:28 +03:00
Roman Gershman
69e6ad799a
fix: remove bad check-fail in the transaction code (#1420)
fix: remove bad check-fail in the transaction code.

Fixes #1421.

The failure reproduces for dragongly running with a single thread where all the
arguments grouped within the same ShardData

Also, we improve verbosity levels inside reply_builder.cc.
For that we extend SinkReplyBuilder to support protocol errors reporting
and we remove ad-hoc code for this from dragonfly_connection.
Required to track errors easily with `--vmodule=reply_builder=1`

Finally, a pytest is added to cover the issue.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-06-18 07:03:08 +03:00
Roy Jacobson
f8d4b6f7c4
Put more keys, make it non-failure if the test fails because of bad params (#1411) 2023-06-14 22:00:12 +03:00
Roy Jacobson
46bf0bb42c
fix(test): Fix a race condition in test_flushall_in_full_sync (#1409) 2023-06-14 13:00:46 +02:00
Vladislav
2a5fd79856
fix: Allow readonly commands in replica script (#1392)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-12 06:14:17 +03:00
Roy Jacobson
9c8b3296b2
fix: A more gracefull shutdown (#1388)
* Add a test for gracefull shutdown

* Add a small wait loop for dispatching connections
2023-06-11 23:22:27 +03:00
Vladislav
e837b3d229
Fix reply builder access issue (#1378)
* fix: Fix invalid reply builder use

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-10 00:50:05 +03:00
Chaka
de21afc6e6
test(cluster): Test that cluster works with a standard cluster client. (#1336)
In this case, `redis.RedisCluster`.

To be double sure I also looked at the actual packets and saw that the
client asks for `CLUSTER SLOTS`, and then after the redistribution of
slots, following a few `MOVED` replied, it asks for the new slots again.
2023-06-06 16:03:09 +03:00
Chaka
5234f77727
fix(replication): Restart replication upon receiving FLUSHALL during full sync (#1347)
Fixes #1231
2023-06-06 12:26:47 +03:00
Vladislav
bf44b56667
fix: fix search_test after incorrect rebase (#1356) 2023-06-05 15:38:40 +03:00
Vladislav
9ab70e4f15
feat: Support tags in search (#1341)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-05 00:26:21 +03:00
Chaka
124437bb77
feat(cluster): Allow actions on non-owned keys on replication port. (#1334)
This allows masters to send data of non-owned keys to their replicas,
which is useful when:

1. Config is temporarily different between master and replica
2. Preparing for taking ownership over currently not-owned slots (in the upcoming migration feature)

Fixed #1319
2023-06-04 16:41:21 +03:00
Vladislav
981e2b2d44
fix: Skip optional WEIGHT param in ft.create (#1340)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-03 20:07:26 +02:00
adiholden
dcfd9262a7 fix(regression test): skip test_disconnect_replica (#1286)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-06-01 15:13:18 +03:00
Chaka
67ca8c8615 test(cluster): Add basic cluster mode pytests. (#1328) 2023-06-01 15:13:18 +03:00
Roy Jacobson
e82ab91425 feat: Report replication lag in INFO REPLICATION (#1246)
* feat: Report replication lag in INFO REPLICATION

* nits

* fix after rebase
2023-06-01 15:13:18 +03:00
adiholden
0d748b3cca fix(regression test): fix test_cancel_replication_immediately (#1326)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-06-01 15:13:18 +03:00
Vladislav
737ca2e918 fix: script flags naming + add stick option (#1295)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-06-01 15:13:14 +03:00
Roy Jacobson
29c258df9b
feat: Support ACKs from replica to master (#1243)
* feat: Support ACKs from replica to master

* Rework after CR

* Split the acks into a different fiber and remove the PING loop

* const convention

* move around the order.

* revert sleep removal

* Exit ack fiber on cancellation

* Don't send ACKs if server doesn't support it
2023-05-29 16:41:57 +03:00
Vladislav
b027655ab1
fix: fix search test (#1306)
fix: fix seach test

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-05-29 10:52:45 +03:00
Chaka
331076c95b
bug(cluster): Fix failing cluster test. (#1300)
Whoops.. :(
2023-05-28 17:37:10 +03:00
Roy Jacobson
57255af18a
chore: Silence unwanted asyncio clutter (#1299) 2023-05-28 15:53:40 +03:00
Vladislav
19732fcd0c
fix: fix dispatch ordering (#1254)
Now `SUBSCRIBE` will respond synchronously.  The change is here so we:

1. Maintain the order in pipelined requests
2. Don't have a "race condition": subscribe needs to update channel store pointers on all threads. While it awaits for all threads to complete the callback, some of them might have done it earlier, so they can already start sending messages before the initial ack is sent

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-05-23 23:55:00 +03:00
Roy Jacobson
cbb2afc792
feat: Use journal LSNs for absolute replication offsets (#1242)
* feat: Use journal LSNs for absolute replication offsets

* 1 - Address small CR comments
2 - Simplify the offset accounting so that we send the correct offset
    in `SliceSnapshot::Stop` instead of counting in RdbLoader. This
    allows us to revert the changes to slice journaling of EXEC
    commands, for example.

* Store int with absl::little_endian

* Document the offset management
2023-05-22 15:34:32 +03:00
Chaka
6962771c21
fix(cluster): Fix breaking test (#1273) 2023-05-22 14:50:19 +03:00
talbii
00d884aff8
fix: Dragonfly ignoring NOREPLY option for Memcached commands (#1233)
* chore: introduce regression testing for memcached

Signed-off-by: talbii <ido@dragonflydb.io>

---------

Signed-off-by: talbii <ido@dragonflydb.io>
Signed-off-by: talbii <41526934+talbii@users.noreply.github.com>
2023-05-18 15:22:21 +03:00
Vladislav
7f547151bf
feat: search json support + client tests (#1210)
* feat: search json support + client tests

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

* fix: small fixes

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

* fix: small fixes

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

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-05-16 11:11:28 +03:00
ashotland
f628131b9e
fix(tests):Small fix to redis replication test (#1213)
Move timeout decrement to the end so we don't assert if we succeed in
the last second (looks like this was the case in the recent regression
test failure on CI)

Clarify the comment of await_synced

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-05-14 01:08:17 +03:00
Vladislav
eec09a13c7
fix: fix test connection name (#1211)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-05-13 15:25:36 +02:00
Vladislav
396cf5f77b
fix: fix duplicated dependency (#1209)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-05-13 12:07:54 +02:00
Vladislav
b0537418bc
fix: use redis.asyncio instead of aioredis (#1206)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-05-13 10:44:25 +03:00
Roy Jacobson
300ccf3218
fix(server): Wrong replication state (#1150)
* fix(server): Read replication state better

* Add basic test for ROLE command and replication
2023-04-30 14:02:47 +03:00
ashotland
6a26d41e90
test(sentinel_test.py): increase timeout in failover test (#1133)
* test(sentinel_test.py): increase timeout from 10 to 15 seconds in test_failover function

Signed-off-by: ashotland <ari@dragonflydb.io>

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-04-24 21:55:11 +03:00
ashotland
6fcd15d1e1
Sentinel test debug (#1125)
Sentinal test debug
- Some more logging
- Use PortPicker

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-04-24 10:53:51 +03:00
adiholden
7f56a435c4
bug(server): replicate scripts in stable state (#1114)
* bug(server): replicate scripts in stable state

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-04-23 23:46:51 +03:00
Vladislav
2d501111ea
Fix async lua bugs (#1123)
Fix async lua bugs:
- Not calling toupper before looking up command id
- Wrong error reply context
2023-04-23 14:50:25 +03:00
adiholden
c6d34678f3
fix(test): add wait for all replicas to finish (#1124)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-04-23 14:20:01 +03:00
Vladislav
74a1454409
Collect errors from async lua calls (#1092)
Error collection from async calls
2023-04-22 09:02:22 +03:00
Roy Jacobson
46a2435865
fix(tests): Disable 'dbfilename' unless explicitly given in the test (#1117) 2023-04-20 13:11:49 +03:00
Roy Jacobson
246f6093db
feat(server): Save on shutdown (#1086)
* feat(server): Save snapshot on shutdown

* CR

* Change save on shutdown to be conditional on --dbfilename.

* Support SHUTDOWN [NO]SAVE and fix unit test

* Better wait for DB loading

* Fix DF format loading state bug

* Fix some fallout from auto save
2023-04-20 06:30:42 +02:00
Roy Jacobson
1319918476
fix(server): Don't allow directory escapes in dbfilename (#1105)
* fix(server): Don't allow directory escapes in dbfilename

* Just disallow directories completely
2023-04-18 21:21:23 -07:00
Vladislav
77e18f0463
fix: report errors from commands with redis.call (#1108)
Redis call now directly reports erros
2023-04-18 17:29:07 +03:00
Roy Jacobson
1382ed1c37
chore: Allow passing empty strings as flag arguments in DflyInstance (#1104)
For example, this is needed to disable auto save on shutdown with --dbfilename=""
2023-04-18 12:48:30 +03:00
Roy Jacobson
d9f45f369a
fix(server): Allow interrupting REPLICAOF commands during full sync (#1058)
* fix(server): Allow interrupting REPLICAOF commands during full sync
* fix(server): Fix a race condition and UB in a debug assert
2023-04-18 11:44:44 +03:00
Vladislav
0e7d137046
fix: fix default instance port blocking in pytest (#1102)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-18 00:12:38 +03:00
Roy Jacobson
c952251381
feat(server): Insert timestamp into snapshot names explicitly (#1028)
* feat(server): Insert timestamp into snapshot names explicitly

* Whenever the snapshot filename contains '{timestamp}', it will be substituted with the current local time.
* Default snapshot name is now "dump-{timestamp}"
* InferLoadFile: Modify to recognize "{timestamp}" files correctly.
* ServerFamily::Load: Change extension 'CHECK' into a non-terminating error because it's user-visible
* ServerFamily::DoSave: Add sanity check for the filename extension.

Signed-off-by: Roy Jacobson <roy@dragonflydb.io>

* resolve CR comments

* Add comment about glob sorted output

* Fix InferLoadFile and fix its tests

* Simplify filename behavior with the .dfs format

---------

Signed-off-by: Roy Jacobson <roy@dragonflydb.io>
2023-04-17 14:59:44 +03:00
Roy Jacobson
fc66dbb2cf
fix(tests): Don't return the same port from PortPicker.get_available_port twice (#1083) 2023-04-13 09:56:46 +03:00
Vladislav
282c168d34
fix: Update cntx->cid on multi-tx'es (#1081)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-12 23:28:31 +03:00
ashotland
5fb5f54885
fix(regression-tests): Add PortPicker (#1078)
* fix(regression-tests): Add PortManager

Add PortManager to find and use available ports in regression tests.
Use it in redis_replicaiton_test.
---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-04-12 19:14:29 +03:00
ashotland
59f1ac6701
fix(regression-test): Delete tests/dump.rdb (#1077)
fix(regression-test): Delete dump.rdb

This fails redis to start in redis_replicaiton_test,
I assume it was added accidently.

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-04-12 14:13:39 +03:00
Vladislav
c774aee6fb
fix: fix lua monitor pytest (#1073)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-11 23:01:34 +03:00
Vladislav
a4305fe2e2
feat(tests): rand seed flag and output (#1044)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-05 16:22:47 +03:00
adiholden
0312b66244
bug(replication): fix deadlock in cancle replication flow (#1007)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-29 12:11:56 +03:00
dependabot[bot]
6a8584b4d6
chore(deps): bump redis from 4.3.4 to 4.5.3 in /tests/dragonfly (#1005)
Bumps [redis](https://github.com/redis/redis-py) from 4.3.4 to 4.5.3.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v4.3.4...v4.5.3)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 17:27:11 +03:00
adiholden
89da9a99d0
bug(replica): support auth master (#1000)
* bug(replica): support auth master

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-28 12:17:53 +03:00
Roman Gershman
32f2f4b72a
fix: list_family_test works with async client (#992) 2023-03-25 21:28:29 +03:00
Roman Gershman
3939da1069
fix: Adapt json_test to async_client (#990) 2023-03-25 16:05:30 +03:00
Chaka
7be98d906d
bug(server): Fix crash in ZPOPMIN (#977)
* Fix crash in ZPOPMIN

Crash was due to an attempt to access nullptr[-1], which is bad :)

* Add test to repro crash.

There's some leftover debugging statements, they're somewhat useful so I
kept them as the bug is not yet fixed.

* Copy patch by romange to solve the crash

Also re-enable (uncomment) the test in utility.py.

Signed-off-by: chakaz <chakaz@chakaz>

---------

Signed-off-by: chakaz <chakaz@chakaz>
Signed-off-by: Chaka <chakaz@users.noreply.github.com>
Co-authored-by: chakaz <chakaz@chakaz>
2023-03-25 10:05:41 +03:00
Roman Gershman
52ac06e358
chore: Improve client connection checking in pytests (#967)
Also fix the compatibility of "client list" with redis-py client.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-24 18:22:14 +03:00
Vladislav
3a6b98f201
fix(pytest): Disable script test (#972) 2023-03-21 16:53:47 +03:00
ashotland
85a1bf8494
fix(tests):Comment out ZPOPMIN Action Again (#971)
fix(tests):Comment out SPOPMIN Action Again 

Until #949 is fixed

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-21 15:26:46 +02:00
Vladislav
6d3a191a5f
tests(replication): Test script replication (#960)
Script replication test
2023-03-20 22:57:52 +03:00
ashotland
d2d70289ff
fix(tests): Revive commented out actions (#962)
* fix(tests): Revive commented out actions
---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-19 22:30:50 +02:00
Roman Gershman
c96f637f73 chore: some pytests and logging improvements
1. pytest extensions and fixes - allows running them
   with the existing local server by providing its port (--existing <port>).
2. Extend "DEBUG WATCHED" command to provide more information about watched state.
3. Improve debug/vlog printings around the code.

This noisy PR is a preparation before BRPOP fix that will follow later.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-17 10:52:20 +02:00
Pascal S. de Kloe
f9ec60ee5f integration test docker image with Go client 2023-03-17 10:09:42 +02:00
adiholden
bafad66fc3
fix(replication): redis replication flush all before full sync (#946)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-15 09:45:04 +02:00
Roman Gershman
66b4fbd14e fix: correctly set batching mode during pubsub
Previously we set batch mode when dispatch queue is not empty
but dispatch queue could contain other async messages related to pubsub or monitor.
Now we enable batching only if there are more pipeline commands in the queue.

In addition, fix the issue of unlimited aggregation of batching buffer.

Fixes #935.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-14 13:01:48 +02:00
adiholden
97e38aebd2
bug(redis replication): fix multi transaction replication stable state (#934)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-13 15:14:58 +02:00
adiholden
8e528f1fbb
fix(redis_replicaiton_test): fix compare set types (#929)
* fix(redis_replicaiton_test): fix compare set types

Signed-off-by: ashotland <ari@dragonflydb.io>
Co-authored-by: ashotland <ari@dragonflydb.io>
2023-03-13 13:37:58 +02:00
Roman Gershman
7975848c36 chore: Expose a corruption when connection writes interleaving messages
The problem happens when a publisher sends a message and a new subscriber registers.
In that case it sends "subscribe" response and the publish messages and those
interleave sometimes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-12 08:15:31 +02:00
ashotland
02770fdcd1
fix(tests):Some test cases for redis replication (#918)
* Some test cases for redis replication

Most of them skipped / commented-out to serve as repro without failing
on CI.

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-08 10:22:58 +02:00
Vladislav
7cb2232edc
fix(pytest): Add master restart delay (#909)
- Add restart delay to master in crashing master test
- Add process check after force shutdown
- Increase time limit to 45 min
2023-03-06 00:16:57 +03:00
talbii
0196589786
fix: logging in sentinel_test (#869)
Signed-off-by: talbii <ido@dragonflydb.io>
2023-03-05 16:15:13 +02:00
ashotland
ccc784d9c4
Add basic replicaiton from redis test (#895)
Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-01 21:50:51 +02:00
Roman Gershman
ac280529cb
fix: resize buffer correctly when checking for http header line (#894)
* fix: resize buffer correctly when checking for http header line

Fixes #779

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

* fix(tests): Add big command test

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

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-03-01 21:46:45 +02:00
Vladislav
edbd43a3b3
Support script configuration (#889)
Store script parameters for each script that allow configuring it's transactions multi mode. They can be configured either for a specific scripts with `SCRIPT CONIFG <sha> [params...]` or changed globally as defaults with `default_lua_config`.
The current supported options are `allow-undeclared-keys` and `disable-atomicity`.  Based on those flags, we determine the correct multi mode. `disable-atomicity` allow running in non-atomic mode, whereas being atomic and enabling `allow-undeclared-keys` requires the global mode.
2023-03-01 19:17:41 +03:00
Leonardo Mello
abe3b3cb91
feat: support cluster mode emulation (#492)
Signed-off-by: Leonardo Mello <lsvmello@gmail.com>
2023-03-01 08:43:40 +02:00
Vladislav
90233bfdc8
feat(tests): Script pytests (#872)
Introduce pytests for eval
2023-02-25 13:06:05 +03:00
Vladislav
afa750303e
feat(tests): Add rotating master test (#828) 2023-02-20 18:18:10 +03:00
ashotland
1f82f9af73
fix(regression-test): Sentinel test stabilization (#826)
* Ditch docker whcih is complex on CI in favour of local redis binary

Signed-off-by: ashotland <ari@dragonflydb.io>

* Fix typo

Signed-off-by: ashotland <ari@dragonflydb.io>

* Wait for sentinel termination

Signed-off-by: ashotland <ari@dragonflydb.io>

* fix(regression-tests): sentinel test increase timeout waiting for key to
exist in replica

* debug sentinel test

Signed-off-by: ashotland <ari@dragonflydb.io>

* add pytest repeat - tmp comment out failure notficicaiton

Signed-off-by: ashotland <ari@dragonflydb.io>

* fix typo

Signed-off-by: ashotland <ari@dragonflydb.io>

* repeat 100

Signed-off-by: ashotland <ari@dragonflydb.io>

* Increase timeout for debuging

Signed-off-by: ashotland <ari@dragonflydb.io>

* Debug prints

Signed-off-by: ashotland <ari@dragonflydb.io>

* fix

Signed-off-by: ashotland <ari@dragonflydb.io>

* increase overall timeout

Signed-off-by: ashotland <ari@dragonflydb.io>

* Debug

Signed-off-by: ashotland <ari@dragonflydb.io>

* cleanup

Signed-off-by: ashotland <ari@dragonflydb.io>

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-02-20 14:21:27 +02:00
ashotland
4b3dc87ba0
Fix(regression-tests): Sentinel test - wait for sentinel termination (#816)
* Ditch docker whcih is complex on CI in favour of local redis binary

Signed-off-by: ashotland <ari@dragonflydb.io>

* Fix typo

Signed-off-by: ashotland <ari@dragonflydb.io>

* Wait for sentinel termination

Signed-off-by: ashotland <ari@dragonflydb.io>

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-02-17 16:45:39 +02:00
Vladislav
83256bd4e1
fix(pytest): fix periodic test (#804)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-02-15 11:12:41 +02:00
Vladislav
6dedb33f85
fix(pytest): SAVE to SAVE RDB (#803) 2023-02-15 11:15:38 +03:00
adiholden
50f50c8380
feat(server): write journal record with optional await based on flag… (#791)
* feat(server): write journal recorod with optional await based on flag issue #788

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-02-15 09:34:24 +02:00
ashotland
49b1ba5b6d
feat(server): Enable overriding --requirepass form env var (#792)
Signed-off-by: ashotland <ari@dragonflydb.io>
2023-02-14 13:19:33 +02:00
Vladislav
25db011afc
fix(server): Fix bugs (#797) 2023-02-14 13:42:20 +03:00
adiholden
ee2807c9bc
feat(replica): add debug command - replica offset (#786)
* feat(replica): add debug command - replica offset

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-02-13 13:00:46 +02:00
Boaz Sade
e7a5d583d0
fix(server): monitor lua at script execution (#767)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-02-12 18:22:40 +02:00
adiholden
41c1ebab18
bug(replica): execute expire within multi command only if its belong … (#766)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-02-08 14:33:05 +02:00