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

2509 commits

Author SHA1 Message Date
Daniel M
7ed686ebf9
fix: add unsupported_server_types to fakeredis tests (#3560)
* fix: add unsupported_server_types to fakeredis tests

* update versions

* fix
2024-08-24 20:25:34 +03:00
Roman Gershman
52b3866351
chore: allow limiting pipelining queue by length (#3551)
* chore: allow limiting pipelining queue by length

We already allow limiting the queue by memory usage but it also makes sense to limit by depth,
so that in extreme cases we would provide backpressure back to client connections. Otherwise if we parse and read everything,
clients do not have a sense of how loaded the connection is on the server side.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-24 18:22:56 +03:00
Vladislav
9f7cbc7d4d
chore(search): fix numeric index query in rev order (#3555) 2024-08-24 13:32:36 +03:00
Vladislav
0e4e971ad9
chore(server): Fix watch (#3557) 2024-08-24 13:32:21 +03:00
Stepan Bagritsevich
3fd3c40b74
fix(search_family): Fix query parsing for the integer tags in OR expression (#3544)
fixes dragonflydb#3490

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-24 11:58:16 +03:00
Roman Gershman
358c644335
fix: zinterstore correctly finds weights (#3554)
1. Fix the bug of computing incorrectly the weight index in OpInter
2. Remove code duplication and factor out the parsing code from OpInter and OpUnion into PrepareWeightedSets
3. Implement TODO and support union of zsets and sets, which has already been implemented for ZINTER.

fixes #3553

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-24 11:52:21 +03:00
Daniel M
c87fcedf1f
docs: Fakeredis tests README (#3552)
* fix:change to py3.10

* doc: tests README
2024-08-24 08:51:38 +03:00
Stepan Bagritsevich
80c3579596
feat(server_family): Add backup/restore Prometheus metrics (#3520)
* feat(server_family): Add backup/restore Prometheus metrics

fixes dragonflydb#3210

---------

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
2024-08-24 00:36:31 +03:00
Daniel M
a66cbe150e
fix: fakeredis tests support python 3.10 (#3550)
* fix:change to py3.10

* fix:change to py3.10
2024-08-23 22:31:35 +03:00
Roman Gershman
dc4dcbfcbd
chore: add deallocation logs in the allocation tracker (#3549) 2024-08-23 17:20:53 +03:00
romange
1987616443 chore(helm-chart): update to v1.21.4 2024-08-23 08:27:40 +00:00
Vladislav
f88e49ba68
chore: fix search replication (#3547)
chore: fix search replcation

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-08-23 08:35:09 +03:00
Daniel M
e3016a6f83
test: tests using fakeredis to check compatibility (#3534)
* fakeredis tests
2024-08-22 22:30:42 +03:00
Kostas Kyrimis
80972c7ace
fix: build errors in sanitizers daily workflow (#3542)
* disable warning for the problematic block in list_family

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-22 17:52:35 +00:00
Stepan Bagritsevich
6cfbc08013
fix(jsonpath): Add JsonPath grammar for the child identifier in brackets (#3533)
* fix(jsonpath): Add json path grammar for the child identifier with brackets

fixes dragonflydb##3511

---------

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
2024-08-22 13:49:50 +03:00
romange
822a8fddc9 chore(helm-chart): update to v1.21.3 2024-08-22 10:33:47 +00:00
Roman Gershman
cec3659b51
fix: named volume permissions in docker (#3518)
Fixes #2917

The problem is described in this "working as intended" issue https://github.com/moby/moby/issues/3124
So the advised approach of using "USER dfly" directive does not really work because it requires
that the host will also define 'dfly' user with the same id. It's unrealistic expectation.

Therefore, we revert the fix done in #1775 and follow valkey approach:
https://github.com/valkey-io/valkey-container/blob/mainline/docker-entrypoint.sh#L12

1. we run the entrypoint in the container as root which later spawns the dragonfly process
2. if we run as root:
   a. we chmod files under /data to dfly.
   b. use setpriv to exec ourselves as dfly.
3. if we do not run as root we execute the docker command.

So even though the process starts as root, the server runs as dfly and only the bootstrap
part has elevated permissions is used to fix the volume access.

While we are at it, we also switched to setpriv following the change of https://github.com/valkey-io/valkey-container/pull/24/files

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-22 11:33:29 +03:00
Vladislav
1bf6d73aa3
fix(transaction): Don't set continuation for blocking (#3540) 2024-08-21 17:48:23 +00:00
Borys
8266c8d026
fix: MC flags size and serialization #3134 (#3538) 2024-08-21 18:31:03 +03:00
Kostas Kyrimis
51f6bbed09
fix: macos build (#3536)
* define IOV_MAX on macos if it's not defined

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-21 16:33:45 +03:00
Stepan Bagritsevich
54cf6f0d06
fix(search_family): Add error on creating indexes from non-zero databases (#3537) 2024-08-21 15:19:21 +03:00
Kostas Kyrimis
4835b5debc
fix: deadlock in Heartbeat() (#3530)
* acquire and immediately release db_slice.GetSerializationMutex() in Heartbeat()

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-20 17:32:04 +03:00
Kostas Kyrimis
b979994025
fix: skip empty objects on load and replication (#3514)
* skip empty objects in rdb save
* skip empty objects in rdb load
* delete empty keys in FindReadOnly

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-20 09:44:41 +03:00
Vladislav
84a697dd75
chore(traffic loger): use pipelining and print/analyze commands (#3527)
Add run, print, analyze commands to traffic logger; add support for pipelines
2024-08-20 09:32:15 +03:00
Vladislav
f90ae4fcff
chore(config): make pipeline_squash configurable (#3529) 2024-08-20 09:31:44 +03:00
Kostas Kyrimis
86e79e13c5
fix: disable sanitizers false positive (#3522)
* disable false positive test cases

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-19 13:46:14 +03:00
Vladislav
d13cd53e17
chore(io): Optimize repeated ReservePiece calls (#3525) 2024-08-19 13:20:34 +03:00
Vladislav
1f36c9952d
chore(io): Introduce (carefully) new io with use_new_io flag (#3513)
Plugs in new IO, must be reverted after successful testing
2024-08-16 16:56:04 +03:00
romange
cd450c2ea8 chore(helm-chart): update to v1.21.2 2024-08-16 01:56:58 +00:00
Kostas Kyrimis
d3a893f2a6
fix: disable ThreadLocalMutex when big value ser is off (#3521)
* fix: disable ThreadLocalMutex when big value ser is off

* refactor: address comments

---------

Co-authored-by: Ubuntu <ubuntu@ip-172-31-28-29.ec2.internal>
Co-authored-by: Borys <borys@dragonflydb.io>
2024-08-15 22:19:01 +03:00
Shahar Mike
ad3ebf61d2
feat(cluster): Allow appending RDB to existing store (#3505)
* feat(cluster): Allow appending RDB to existing store

The goal of this PR is to support the loadoing of multiple RDB files into a single server, like when migrating from a Valkey cluster to Dragonfly with a different number of nodes.

It makes the following changes:

* Removes `DEBUG LOAD`, as we already have `DFLY LOAD`
* Adds `APPEND` option to `DFLY LOAD` (i.e. `DFLY LOAD <filename> APPEND`) that loads an RDB without first flushing the data store, overriding existing keys
* Does not load keys belonging to unowned slots, if in cluster mode

Fixes #2840
2024-08-15 14:56:40 +03:00
Shahar Mike
5b546df94d
chore: Change Lua embedded flags syntax (#3517)
Background

We tried to be compatible with Valkey in their support of Lua flags, but we generally failed:

We are not really compatible with Valkey because our flags are different (we reject unknown flags, and Valkey flags are unknown to us)
The #!lua syntax doesn't work with Lua (# is not a comment), so scripts written for older versions of Redis can't be used with Dragonfly (i.e. they can't add Dragonfly flags and remain compatible with older Redis versions)
Changes

Instead of the previous syntax:

#!lua flags=allow-undeclared-keys,disable-atomicity

We now use this syntax:

--!df flags=allow-undeclared-keys,disable-atomicity
It is not backwards compatible (with older versions of Dragonfly), but it should be very easy to adapt to, and doesn't suffer from the disadvantages above.

Related to #3512
2024-08-15 08:04:20 +03:00
Roman Gershman
81eff01b9d
fix: bugs around the growth of a tiered file (#3516)
1. Before - when 15% margin of total size becomes larger than 256MB, we increased the file by 256MB even though
   we still had unused 256MB. Now it's fixed.
2. We attempted to grow a file even if it reached the limit and then returned the error.
   It is wrong handle "reach the limit" state as an error - it's just a logical constraint,
   so now we do not attempt to grow and handle this quietly.
3. There was a segfault bug in extent tree in case the existing segment and the new one needs to be united.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-15 07:24:31 +03:00
Roman Gershman
93f6773297
chore: reduce pipelining latency by reusing existing shard fibers (#3494)
* chore: reduce pipelining latency by reusing existing shard fibers

To prove the benefits, run `./dfly_bench --pipeline=50   -n 20000  --ratio 0:1  --qps=0  --key_maximum=1`
Before: the average pipelining latency was 10ms
After: the average pipelining latency is 5ms.
Avg latency: pipelined_latency_usec / total_pipelined_squashed_commands

Also, improved counting of squashed commands - to count actual squashed ones.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-14 14:45:54 +03:00
Roman Gershman
a2e63f144c
fix: clang warnings (#3509)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-14 09:39:56 +00:00
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