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

613 commits

Author SHA1 Message Date
Roman Gershman
1eef773d0a
fix: test_noreply_pipeline flakiness (#4102)
Fixes #3896. Now we retry several times.
In my checks this should significantly reduce the failure probability.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 13:39:24 +02:00
adiholden
ae3faf59fb
feat(server): dont use channel for replication / save df (#4041)
* feat server: dont use channel for replication / save df

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-05 16:50:01 +02:00
dependabot[bot]
54c67a9198
chore(deps): bump pytest-repeat from 0.9.1 to 0.9.3 in /tests/dragonfly (#4057)
Bumps [pytest-repeat](https://github.com/pytest-dev/pytest-repeat) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/pytest-dev/pytest-repeat/releases)
- [Changelog](https://github.com/pytest-dev/pytest-repeat/blob/main/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-repeat/compare/v0.9.1...v0.9.3)

---
updated-dependencies:
- dependency-name: pytest-repeat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 23:47:24 +02:00
dependabot[bot]
94ee96afd0
chore(deps): bump redis-om from 0.2.2 to 0.3.3 in /tests/dragonfly (#4060)
Bumps [redis-om](https://github.com/redis/redis-om-python) from 0.2.2 to 0.3.3.
- [Release notes](https://github.com/redis/redis-om-python/releases)
- [Commits](https://github.com/redis/redis-om-python/compare/v0.2.2...v0.3.3)

---
updated-dependencies:
- dependency-name: redis-om
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:35:18 +02:00
dependabot[bot]
b70f9703f4
chore(deps): bump tomli from 2.0.1 to 2.0.2 in /tests/dragonfly (#4059)
Bumps [tomli](https://github.com/hukkin/tomli) from 2.0.1 to 2.0.2.
- [Changelog](https://github.com/hukkin/tomli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hukkin/tomli/compare/2.0.1...2.0.2)

---
updated-dependencies:
- dependency-name: tomli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:31:29 +02:00
Roman Gershman
cc6fdd7fbf
chore: add retry to test_noreply_pipeline test (#4045) 2024-11-04 08:32:48 +00:00
Borys
e4b468d953
fix: reduce memory consumption during migration (#4017)
* refactor: reduce memory consumption for RestoreStreamer
* fix: add Throttling into RestoreStreamer::WriteBucket
2024-11-03 17:03:45 +02:00
Borys
5a597cf6cc
test: update test_big_containers (#4025) 2024-11-03 16:20:11 +02:00
Roman Gershman
c8b56b69b4
chore: print info stats if test_noreply_pipeline fails (#4016) 2024-10-30 08:17:15 +00:00
Kostas Kyrimis
4b495182e8
fix: separate Heartbeat and ShardHandler to fibers (#3936)
* separate shard_handler from Heartbeat
* add test

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-29 09:22:53 +02:00
Roman Gershman
41d8c66a15
fix: flaky test_failover test (#4007)
Prevent from checking replica too early,
to avoid "Loading" exception.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 14:58:36 +02:00
Borys
c80d21fcba
fix: crash if we OOM during migration process (#3968) 2024-10-23 17:04:08 +03:00
Stepan Bagritsevich
ea9dc9c454
chore(fakeredis): Enable JSON tests in the Fakeredis tests (#3773)
* chore(fakeredis): Enable JSON tests in the Fakeredis tests

fixes dragonflydb#3671

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* refactor: address comments

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* tmp commit

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* refactor: address comments 2

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>
2024-10-23 08:53:14 +02:00
Kostas Kyrimis
37fec87070
chore: increase load in test_noreply_pipeline (#3960)
Test is flaky because it relies that the producer (the pytest) to send fast enough a bunch of commands before they get dispatched synchronously so I increased the load.
2024-10-22 21:00:25 +03:00
Borys
dec0712e15
test: add test to test big collections or collections with big values (#3959) 2024-10-22 15:01:32 +03:00
Kostas Kyrimis
119723316e
chore: tune test_rss_used_mem_gap (#3958)
It appears that newer versions of the gh runner require more memory. Some cases of the test test_rss_used_mem_gap allocate more than 6.5-7 gb of memory leaving barely 0.5gb to the gh runner (7.5 in total available) which sometimes cause the instance to run out of memory.
2024-10-22 10:31:13 +03:00
Kostas Kyrimis
478a5d476d
chore: disable test_cluster_memory_consumption_migration (#3948)
Test takes more than 10 minutes on the CI and it causes it to timeout
2024-10-21 08:41:15 +03:00
Vladislav
32a31cf1d8
chore(facade): Fix bad new IO glue (#3940)
* chore(facade): Fix bad new IO glue

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-10-18 23:25:56 +03:00
Borys
866c82a3fa
test: add test to reproduce a lot of memory consumtion during migration (#3939) 2024-10-17 14:23:26 +03:00
Shahar Mike
c3f9ec18ae
fix: Fix test_flushall_in_full_sync (#3929)
* fix: Fix `test_flushall_in_full_sync`

This test failed in CI many times. The issue was that we reach stable
sync too quickly, and miss the full sync stage.

I changed the seeder to add 100k (instead of 30k) keys for the stage to
take longer.

* StaticSeeder
2024-10-15 11:48:32 +00:00
adiholden
a1830e1b5e
feat(server): use listpack node encoding for list (#3914)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-10-15 13:55:26 +03:00
Shahar Mike
c868b27bbe
fix: Support replicating Valkey and Redis 7.2 (#3927)
Until now, we only tested Dragonfly against Redis 6.2.  It appears that
something has changed in the way Redis sends stable sync commands, and
now they also forward `MULTI` and `EXEC` as part of their replication.

Since we do not allow all commands to run under `MULTI`/`EXEC`,
specifically `SELECT`, a Dragonfly replica of such servers failed these
commands and became inconsistent with the data on the master.

The proposed fix is to simply ignore (i.e. not execute) `MULTI`/`EXEC`
coming from a Redis/Valkey master, and run the commands within those
transactions individually, like we do for other transactions.

To test this we randomly choose a redis/valkey server based on 3
available installed binaries and test against them.
2024-10-15 13:12:16 +03:00
Kostas Kyrimis
588d6cc339
chore: relax assertion in test_noreply_pipeline (#3908)
*adjust assert condition

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-14 09:27:57 +03:00
Vladislav
e71f083f34
feat(search): STOPWORDS (#3851)
Adds support for STOPWORDS option
2024-10-10 21:58:12 +03:00
Kostas Kyrimis
a5fa3ab9f5
chore: skip flaky test_noreply_pipeline (#3903)
* Disable the test_noreply_pipeline because it's really flaky. Will look on this once I wrap up with my pending tasks.
2024-10-10 07:37:13 +00:00
Vladislav
786c9cd44d
chore: collection size (#3844) 2024-10-08 18:51:11 +03:00
Shahar Mike
b2ebfd05d4
fix: Do not publish to connections without context (#3873)
* fix: Do not publish to connections without context

This is a rare case where a closed connection is kept alive while the
handling fiber yields, therefore leaving `cc_` (the connection context)
pointing to null for other fibers to see.

As far as I can see, this can only happen during server shutdown, but
there could be other cases that I have missed.

The test on its own does _not_ reproduce the crash, however with added
`ThisFiber::SleepFor()`s I could reproduce the crash:

* Right before `DispatchBrief()`
  [here](e3214cb603/src/server/channel_store.cc (L154))
* Right after connection context `reset()`
  [here](2ab480e160/src/facade/dragonfly_connection.cc (L750))

In any case, calling `SendPubMessageAsync()` to a connection where `cc_`
is null is a bug, and we fix that here.

* rewording
2024-10-08 14:45:57 +03:00
Daniel M
1958e09a9a
refactor: refactor fakeredis tests (#3852)
* refactor:fakeredis tests
2024-10-03 12:41:05 +03:00
adiholden
fa288c19b2
test: more stabe test_bgsave_and_save (#3843)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-10-01 15:03:12 +03:00
Kostas Kyrimis
ec353e1522
chore: add logs to test_acl_cat_commands_multi_exec_squash (#3826)
* add logs to test

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-30 12:03:40 +00:00
Kostas Kyrimis
b19f722011
chore: do not close connections at the end of pytest (#3811)
A common case is that we need to clean up a connection before we exit a test via .close() method. This is needed because otherwise the connection will raise a warning that it is left unclosed. However, remembering to call .close() at each connection at the end of the test is cumbersome! Luckily, fixtures in python can be marked as async which allow us to:

* cache all clients created by DflyInstance.client()
* clean them all at the end of the fixture in one go

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-30 09:54:41 +03:00
Kostas Kyrimis
ed11c8d3a4
chore: allow config set notify_keyspace_events (#3790)
We do not allow notify_keyspace_events to be set at runtime via config set command.

* allow notify_keyspace_events in config set command
* add tests

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-30 09:54:02 +03:00
Borys
ce0320300b
test: update test_noreply_pipeline to prevent false fail (#3801) 2024-09-26 12:12:53 +00:00
Kostas Kyrimis
105c2bd761
fix: bitop do not add dst key if result is empty (#3751)
* fix bitiop creating the dst key if result is empty
* fix replicating dst with the wrong type
* make bitop a blind update (similar to set command)

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-25 09:45:20 +03:00
Shahar Mike
526bce4222
chore: Forbid replicating a replica (#3779)
* chore: Forbid replicating a replica

We do not support connecting a replica to a replica, but before this PR
we allowed doing so. This PR disables that behavior.

Fixes #3679

* `replicaof_mu_`
2024-09-24 13:42:22 +00:00
Shahar Mike
9aadc0cd2b
fix: Fix flaky test test_acl_revoke_pub_sub_while_subscribed (#3768)
fix: Fix flaky test `test_acl_revoke_pub_sub_while_subscribed`

The reason it failed is that, in some rare cases, the subscriber did not
get the first few messages of the publisher. This is likely due to
timing of subscribe and publish, in different connections / threads.

Given Pub/Sub has very weak guarantees, it's probably ok as is, so I
just added a sleep to get the test to pass always.
2024-09-24 11:47:17 +03:00
Borys
3804076ea9
fix: setrange with empty value doesn't modify the DB (#3771) 2024-09-23 19:09:53 +03:00
Kostas Kyrimis
15fce9df2d
chore: logs on assert fail for test_acl_cat_commands_multi_exec_squash (#3749)
* print result if assertion fails

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-23 09:51:58 +03:00
Roman Gershman
29b18f0dcb
fix: tune test_replicaof_reject_on_load parameters (#3762)
Reduce the snapshot size by 20% and increase the timeout to avoid failures due to slow loads.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-23 09:50:10 +03:00
Roman Gershman
e09ebe0c5c
fix: test deadlock with processing the stdout of sed (#3735)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-22 15:40:27 +03:00
adiholden
4d38271efa
feat(server): introduce rss oom limit (#3702)
* introduce rss denyoom limit

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-09-22 13:28:24 +03:00
adiholden
5cf917871c
feat(server): introduce oom_deny_commands flag (#3718)
* server: introduce oom_deny_commands flag

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-09-22 09:32:18 +03:00
Kostas Kyrimis
ed21867fe9
chore: add missing await in test_take_over_seeder (#3744)
* add missing await

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-19 17:03:11 +00:00
Shahar Mike
55e3647248
chore: Switch ports for cluster_mgr_test.py (#3741)
We saw failures due to port already in use
2024-09-19 12:32:31 +03:00
adiholden
409c2a3beb
test: add test for replication deadlock on replication timeout (#3691)
* test: add test for replication deadlock on replication timeout

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-09-19 12:11:28 +03:00
Borys
bbaa2669f9
test: unskip test for debugging purpose (#3738) 2024-09-18 14:13:07 +00:00
Borys
f122a19a02
test: add tests for replication (#3734)
* test: add tests for replication
2024-09-18 16:32:21 +03:00
Kostas Kyrimis
6e45c9c3e2
fix: properly track json memory usage (#3641)
* add JsonMemTracker
* add logic based on MiMallocResource deltas that calculates json object usage
* add test

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-18 13:08:43 +00:00
Shahar Mike
ffb4c2b601
fix: Fix test_take_over_seeder (#3733)
The test assumed any shutdown will take not more than 1s. This doesn't
always hold, and also waiting for 1s isn't ideal because usually it
takes less than that.

Changed to use `assert_eventually` instead.

Fixes #3684
2024-09-18 14:17:09 +03:00
Shahar Mike
1c6be62a0b
fix: Fix cluster_mgr.py (#3730)
We updated the reply of `SLOT-MIGRATION-STATUS`, so `cluster_mgr.py`
needs to be adjusted as well.
2024-09-18 11:44:15 +03:00