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

2474 commits

Author SHA1 Message Date
Roman Gershman
fa0913e662
chore: introduce a secondary TaskQueue for shards (#3508)
Also allow the TaskQueue to support multiple consumer fibers.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-14 10:53:29 +03:00
Roman Gershman
5cfe4154cc
chore: split engine_shard file from engine_shard_set (#3507)
No functional changes besides that.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-13 22:27:46 +03:00
Kostas Kyrimis
0786fc83c1
fix: missing virtual destructors in ReplyBuilder2 (#3506) 2024-08-13 17:20:15 +03:00
Kostas Kyrimis
d37c2ec85a
fix: pytest warnings (#3497)
* fix truncating the timeout red dots on CI failures
* fix deprecated use of with timeout warnings
* remove @pytest.mark.dbg_only as it doesn't exist
---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-13 16:05:15 +03:00
Stepan Bagritsevich
c756023332
feat: Expose replica_reconnect_count for Prometheus metrics (#3370) 2024-08-13 12:34:01 +02:00
Kostas Kyrimis
3f5d4f890d
fix: sanitizers false positives (#3495)
* disable flaky tests

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-13 09:53:31 +03:00
Stepan Bagritsevich
930a496152
chore(generic_family): Fix bad data format error in the RESTORE command (#3501)
* chore(generic_family): Fix bad data format error in the RESTORE command

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>

* chore(generic_family): Remove the error reply for OpStatus::WRONG_TYPE in the RESTORE command, since it is no longer in use

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>

---------

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
2024-08-12 12:16:06 +00:00
Kostas Kyrimis
634b08dc53
fix: sanitizers post failure on google chat (#3496)
* fix sanitizers failure post on google chat
* only report failures on main branch

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-12 07:04:57 +00:00
Borys
f386b0b294
test: fix test_acl_deluser (#3488)
* test: fix test_acl_deluser
2024-08-12 09:34:51 +03:00
Roman Gershman
29a13893c2
feat: implement FT.TAGVALS (#3493)
* feat: implement FT.TAGVALS

Fixes #3491

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-11 22:53:25 +03:00
Roman Gershman
766b0ec86f
chore: add logs to debug tiered memory failures (#3499) 2024-08-11 22:52:58 +03:00
Kostas Kyrimis
e79f3fb206
fix: test_replicate_old_master missing serialization_max_chunk_size (#3498) 2024-08-11 18:41:56 +03:00
Kostas Kyrimis
db7bd0670a
fix: flake in teardown of test_unknown_dfly_env (#3487)
* set dfly instance to none on when it fails to start

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-11 14:52:44 +03:00
Kostas Kyrimis
b6d528cb5c
fix: HELLO AUTH with non default user (#3486)
* fix HELLO AUTH with non default user
* add test_auth_resp3_bug
* add decode_responses=True to acl tests and refactor
* fix test_default_user_bug

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-11 14:35:26 +03:00
Kostas Kyrimis
1c9e9c5922
fix: big value serialization corner cases (#3430)
There are some problematic flows. First we did not handle deletions, so all sorts of consistency issues could arise while calling DbSlice::Traverse() and DbSlice::Del(). Second, we did not handle FlushAll (same as before, Traverse() preempts and FlushAll() kicks in. Third we did not handle expirations.

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-11 14:17:32 +03:00
Vladislav
41ebb075a1
chore(facade): RedisReplyBuilder2 (extensions) (#3481)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-08-09 23:16:33 +03:00
Vladislav
63a4ad6de1
chore(facade): MCReplyBuilder2 (#3480) 2024-08-09 20:16:08 +03:00
Vladislav
19fb7aa158
chore(facade): RedisReplyBuilder2 base (#3475) 2024-08-09 15:26:36 +03:00
romange
6d945c6b81 chore(helm-chart): update to v1.21.1 2024-08-09 11:38:30 +00:00
Borys
7ff56c5ab7
test: fix test_scripts (#3485) 2024-08-09 08:15:47 +00:00
Roman Gershman
b9cafaab4b
fix: division by zero bug (#3482) 2024-08-09 09:49:29 +03:00
Shahar Mike
ca34e05f26
chore: Download Dragonfly versions only when needed (#3479) 2024-08-09 08:18:00 +03:00
Roman Gershman
a8c6e4d314
chore: relax the version check in test_replicate_old_master (#3478)
For commits marked with a git tag, the previous check did not hold.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-08 19:14:33 +00:00
Borys
48a28c3ea3
refactor: set info_replication_valkey_compatible=true (#3467)
* refactor: set info_replication_valkey_compatible=true
* test: mark test_cluster_replication_migration as skipped because it's broken
2024-08-08 21:42:58 +03:00
Vladislav
5258bbacd1
chore(facade): Update SinkReplyBuilder2 (#3474) 2024-08-08 21:40:49 +03:00
Roman Gershman
fb7a6a724d
chore: make tiered_test more reliable (#3477) 2024-08-08 20:08:00 +03:00
Shahar Mike
b6b42c9f26
fix: Make replica's REPLCONF IP-ADDRESS optional (#3473)
**Background**

In v1.21.0 we introduced support for `--announce_ip` for replicas to
announce their public IP addresses.

Like Valkey, this uses `REPLCONF IP-ADDRESS` to announce their IP
address.

**The issue**

Older Dragonfly releases (<1.21) did not support this feature. The
master side simply returned an error for such `REPLCONF` attempts,
however the replica code failed the replication, resulting in
incompatible versions.

**The fix**

The fix is simple, just log an error if the master did not respect
`REPLCONF IP-ADDRESS`. We can make this non-optional in the future
again.

However, in addition, I added a regression test to make sure we are
backwards compatible with v1.19.2. We'll bump this up every once in a
while.
2024-08-08 17:22:30 +03:00
Vladislav
7b9bbc19d7
chore(server): Use parser more in list_family (#3461)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-08-08 12:16:33 +03:00
Shahar Mike
aa424c81af
feat: Allow pre-declaring Lua SHAs to run with undeclared keys (#3465)
* feat: Allow pre-declaring Lua SHAs to run with undeclared keys

By using `--lua_undeclared_keys_shas=SHA,SHA,SHA` users can now specify
which scripts should run globally (undeclared keys) without explicit
support from the scripts themselves.

Fixes #2442
2024-08-08 10:27:27 +03:00
Vladislav
1b1a83dc58
chore: SinkReplyBuilder2 with vec batching (#3454) 2024-08-07 18:34:52 +03:00
Vladislav
8587377a03
chore(server): Remove old blocking debug (#3460) 2024-08-07 16:52:09 +03:00
Roman Gershman
1cbfcd4912
chore: add timeout to replication sockets (#3434)
* chore: add timeout fo replication sockets

Master will stop the replication flow if writes could not progress for more than K millis.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roman Gershman <romange@gmail.com>
Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
2024-08-07 16:33:03 +03:00
Roman Gershman
7c84b8e524
chore: change how we track memory_budget during evictions (#3457)
* chore: change how we track memory_budget during evictions

We compared memory_budget vs 0 before inserting a new item in DbSlice,
and retired cool pages if we are low on memory.

The problem - when we decide whether we allow growing a table, we estimate the possible object size increase due to the future table growth.
And the memory check described before was not consistent with the actual logic that rejected the insertion.

Moreover, the memory_budget tracking interaction with EvictionPolicy was over-complicated: we passed the memory_budget counter to the evp object
and then read it back, even though evp did not track object deletions memory impact during objects evictions.

Now, we remove the responsibility from evp to update memory_budget_ so it's solely updated by DbSlice.
We also update memory_budget_ during deletions, and when we pass it to evp, we add cool memory size as potential memory resource to avoid
rejections in case we have lots of cool memory.

Fixes #3456
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-07 15:43:45 +03:00
Kostas Kyrimis
41be819dbb
fix: pytest teardown exception in os.remove(LAST_LOGS) (#3463)
os.remove(LAST_LOGS) might throw an exception if the file does not exist which we do not handle. Wrap it in try/catch block

* wrap in try/catch os.remove

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-07 14:27:04 +03:00
romange
5db8d27363 chore(helm-chart): update to v1.21.0 2024-08-07 09:13:04 +00:00
Stepan Bagritsevich
75452a7108
feat(json_family): Add support of the JSON legacy mode (#3284) 2024-08-06 18:04:45 +02:00
Roman Gershman
7df72fd6d0
chore: integrate quicklist changes from valkey (#3440)
The quicklist.* files are mostly equal to the versions at commit 0fc43edc6
Also, removed some unused code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-06 16:25:16 +03:00
Borys
070e7b02c6
fix: JSON.MSET command (#3459) 2024-08-06 15:37:03 +03:00
Kostas Kyrimis
ff716bb8b0
fix: missing logs on ci timeout (#3452)
The env variables exported when regression tests timeout are not working properly and the if statement on the action step Print last log on timeout would fail to read and upload the files set in /tmp/last_log_file.txt. Furthermore, another problem is the job.timeout argument that kills the whole job/matrix before the upload log step has a chance to run. For that, we need manual timeouts on the workflow similar to what we do in regression tests action.

* remove print last log on timeout action step
* copy the logs on timeout directly within the timeout step
* replace global timeout on CI workflow with timeout command per step


---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-06 14:52:18 +03:00
Roman Gershman
420046aac8
fix: properly seriailize meta buffer in SendStringArrInternal (#3455)
Fixes #3449 that was introduced by #3425

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-06 10:43:05 +03:00
Roman Gershman
e482eefcbb
chore: disable serialization_max_chunk_size in regtests (#3445)
Intended to stabilize regression tests before releasing our next version.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-05 07:38:18 +00:00
Shahar Mike
38fba1d398
fix: cluster_mgr.py to use CLUSTER MYID (#3444) 2024-08-05 07:29:31 +00:00
Borys
faea4eef45
test: fix test_disconnect_replica (#3442) 2024-08-05 10:07:27 +03:00
Roman Gershman
6da445fcfe
feat: DEBUG REPLICA PAUSE now pauses fullsync (#3441)
Before that PAUSE paused the reconnection reconciler flow,
now it also stops the ongoing full sync replication if such exists.

In addition, this PR applies some clean-ups and removes redundant code

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-05 09:42:57 +03:00
Kostas Kyrimis
3f08a60148
chore: reset serialization_max_chunk_size to 0 (#3432)
* reset serialization_max_chunk_size to 0
* reword flag information

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-05 09:36:23 +03:00
Roman Gershman
9eacedf58e
chore: simplify master replication cancelation interface (#3439)
* chore: simplify master replication cancelation interface

Before that CancelReplication did too many things, moreover,
we had StopReplication that did the same.

This PR moves CancelReplication under ReplicaInfo struct,
and reduces code duplication around this change.

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

* Update src/server/dflycmd.cc

Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
Signed-off-by: Roman Gershman <romange@gmail.com>

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roman Gershman <romange@gmail.com>
Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
2024-08-04 19:00:52 +00:00
Vladislav
55d39b66ff
chore: fix memcached pipeline test (#3438) 2024-08-04 15:41:17 +03:00
Roman Gershman
8f7c36e4b3
chore: reorganize EngineShard::Heartbeat (#3437)
* chore: reorganize EngineShard::Heartbeat

1. Simplify CacheStats by using accessorts directly provided by DbSlice
2. Separate eviction for tiering as tiering can be done on replica.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-04 15:00:43 +03:00
Roman Gershman
cfd2273fb0
chore: improve replication locks (#3436)
* chore: improve replication locks

Allow non-exclusive, read-only access to Dfly::ReplicaInfo structure.
The most important change is in DflyCmd::CancelReplication, where before
it has locked ReplicaInfo mutex and then continued with locking the global mutex.
It is dangerous because most operation lock them in the opposite order.

Also rename ambigous GetReplicaInfo accessors to clearer names.

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

* chore: comments

* chore: comments

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-04 10:55:50 +00:00
Vladislav
2ef475865f
test(cluster): Migration replication test (#3417) 2024-08-04 12:45:02 +03:00