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

169 commits

Author SHA1 Message Date
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