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

2780 commits

Author SHA1 Message Date
Shahar Mike
1306a91bda
chore: Add CLIENT ID command (#3672)
We already adhere to all requirements, we just need to return the id
when the command is issued :)

Fixes #3651
2024-09-08 22:00:53 +03:00
Stepan Bagritsevich
0e7c12f5d6
fix(search_family): Fix FT.AGGREGATE GROUPBY option (#3657) 2024-09-08 17:29:09 +02:00
romange
14ac055a47 chore(helm-chart): update to v1.22.1 2024-09-08 09:29:23 +00:00
Roman Gershman
264835e9c4
chore: cosmetic changes around Snapshot functions (#3652)
* chore: cosmetic changes around Snapshot functions

Some renames and added comments. Refactored StartIncremental into a separate function
without any functional changes.

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

* chore: fix comments

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-08 09:25:41 +03:00
Roman Gershman
1d34bf735e
fix: recursive calls in the allocation tracker (#3665)
Also, remove dependence of absl::TimeZone bloated monstrosity, which was required by
absl::FormatTime api, even though we do not actually format a timezone.

When absl::LocalTimeZone is accessed it allocates hundreds of thousands of bytes
for each shard thread (maybe due to lack thread safety during lazy initialization).

At the end, strftime does a great job without any shenanigans.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-08 06:24:09 +00:00
Joe Zhou
8e064cd619
chore: add some community suggestions to README (#3664) 2024-09-07 14:09:02 +03:00
Borys
1ed3702af7
test: fix MC test_expiration (#3663) 2024-09-06 14:20:21 +03:00
Borys
894bf4735b
fix: fix multi mget exec error message (#3662) 2024-09-06 13:06:02 +03:00
Borys
2cc2a23247
fix: deadlock in the cluster migration process (#3653) 2024-09-05 21:55:15 +03:00
Borys
a1e9ee1b6d
CmdArgParser improvement (#3633)
* feat: add processing of tail args into CmdArgParser::Check
* refactor: rename CmdArgParser::Switch to Map
* feat: add CheckMap method into CmdArgParser
2024-09-05 15:30:54 +03:00
Roman Gershman
3461419088
chore: allow disabling io_uring registered buffers (#3650) 2024-09-05 14:47:42 +03:00
Daniel M
eef5be1729
test: remove redundant tests (#3642)
* test: remove redundant tests

* remove more tests

* add test_bitmap_commands

* add test_bitmap_commands and test_geo_commands to ignore list
2024-09-04 23:55:35 +03:00
Tarun Pothulapati
65f96e3bb5
fix(docker/healthcheck): run netstat port retreival command as dfly (#3647)
* fix(docker/healthcheck): run netstat port retreival command as dfly
2024-09-04 14:34:35 +00:00
romange
7e3e4c507e chore(helm-chart): update to v1.22.0 2024-09-03 15:41:24 +00:00
Roman Gershman
67117ff081
fix: crash during SORT DESC call (#3637)
fixes #3636

The problem was that instead of implementing GT operator, we implemented
!LT, which is GE operator. As a result the iterators inside the sort algorithm reached
out of bounds.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-03 12:00:31 +00:00
Kostas Kyrimis
2c32e5085c
fix: debug help printed layout (#3635)
* add missing comma to fix the printed layout

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-03 14:04:50 +03:00
Roman Gershman
cf7c983423
fix: 'renamenx foo foo' should return 0 if foo exists (#3630)
fix: renamenx foo foo should return 0 if foo exists

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-03 10:58:55 +00:00
Roman Gershman
e6f5a2073c
fix: crash when passing empty arguments (#3627)
* fix: crash when passing empty arguments

Fix the case where we pass an empty argument, which then is parsed as an
empty string view with null pointer. The null pointer is not handled correctly
by our low level c code, hence switch to using ""sv for that.


* chore: add more list asserts + improve test_hypothesis
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-03 12:43:12 +03:00
Kostas Kyrimis
f8f8c69e6a
chore: disable big value ser on reg tests (#3629)
* disable big value ser on reg tests

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-03 08:04:27 +00:00
Roman Gershman
1a0d44354f
fix: limit parsing in zrange commands (#3626)
1. The offset value can be negative, in that case we should return an empty array.
2. Fix edge cases of inf*0 and -inf + inf, so they will result in 0 and non NaN (similarily to Valkey).

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-03 10:08:45 +03:00
Borys
d40e9088ae
refactor: remove extra code from CmdArgParser (#3619)
* refactor: remove extra code from CmdArgParser
2024-09-03 07:04:05 +00:00
Borys
8fca7dd9f8
test: fix search tests (#3625) 2024-09-03 09:21:47 +03:00
Roman Gershman
879f2950e5
fix: edge cases around mismatched path in json code (#3609)
For legacy mode:
1. For mutate commands, an empty result should throw an error
2. For read commands, it returns nil if path was not found, but if it was matched
   but only with a wrong types, it will throw an error.

For non-legacy mode, objlen should throw an error for non existing key.

Simplified JsonCallbackResult a bit and made sure more fakeredis tests are passing.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-02 21:37:59 +03:00
Roman Gershman
eef1de33fd
chore: improve debug logs in dragonfly_connection (#3624)
Adresses #3623

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: adiholden <adi@dragonflydb.io>
2024-09-02 18:13:16 +03:00
Kostas Kyrimis
959b96e7cc
fix(test_auth_resp3_bug): release build failing (#3621)
* remove problematic assertion

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-09-02 14:32:53 +00:00
adiholden
7203667723
fix(bug): zinter command should run on replica (#3620)
fix bug: zinter command should run on replica

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-09-02 12:59:11 +03:00
adiholden
658243fd09
fix pytest: use generic random dbfilename in tests (#3617)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-09-02 09:27:22 +03:00
Borys
8e9b097b9d
fix: fix expiration processing for set command (#3607)
* fix: fix expiration processing for set command
2024-09-02 08:44:11 +03:00
Shahar Mike
de5ecc7447
chore: Split --cluster_announce_ip and --replica_announce_ip (#3615)
chore: Split `cluster_announce_ip` and `replica_announce_ip`

This PR partially reverts #3421

Fixes #3541
2024-09-01 12:43:44 +00:00
Roman Gershman
10de338926
chore: run fakeredis flow with the debug build (#3612)
1. Fix html publishing code
2. Upload dragonfly logs
3. Run it on pull requests

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-09-01 14:51:00 +03:00
Roman Gershman
5c48320496
fix: debug crash inside parsing of ZRANGE (#3611)
Also, fix error msg for EXEC command and finally tune more fakeredis tests.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-31 08:02:21 +03:00
Sebastian Struß
06f6dcafcd
fix(grafana): Fix grafana dragonfly dashboard datasource (#3608)
fix: grafana dragonfly dashboard datasource
2024-08-30 17:15:51 +00:00
Stepan Bagritsevich
31463c288d
fix(json_family): Fix JsonFromString method (#3602)
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-30 19:39:25 +03:00
Roman Gershman
dd0effac6f
feat: add slave_repl_offset to the replication section. (#3596)
* feat: add slave_repl_offset to the replication section.

In Valkey slave_repl_offset denotes the replication offset on replica site during stable sync phase.
During fullsync phase it appears with 0 value.

In Dragonfly this field appears only after full sync has completed, thus it allows
to check whether Dragonfly reached stable sync phase. The value of this field describes the cumulative progress
of all the replication flows and it does not directly correspond to master side metrics.

In addition, this PR fixes the bug in wait_available_async() function in our replication tests.
This function is intended to wait until a replica reaches stable state and it did by sending pings until they do not
respond with LOADING error, hence the assumption is that the replica is in full sync state already.

However it can happen that master_link_status is "up" but replica has not reached full sync state, and the PING will succeed
just because wait_available_async() was called before full sync started. The whole approach of polling the state is fragile.

Now we use `slave_repl_offset` explicitly to see if the replica reaches stable state.

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

* chore: simplify wait_available_async

* chore: comments

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-30 18:58:07 +03:00
Kostas Kyrimis
41f7b611d0
chore: enable -Werror=thread-safety and add missing annotations (part 2/2) (#3595)
* add missing annotations
* small mutex fixes
* enable -Werror=thread-safety for clang builds

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-30 15:42:30 +03:00
Kostas Kyrimis
0705bbb536
feat(acl): add pub/sub (#3574)
* add support for pub/sub
* add tests
---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-30 15:41:28 +03:00
Stepan Bagritsevich
a22eff15dc
fix(server_family): Remove search indexes during the FLUSHALL command (#3539)
* fix(server_family): Add search indixes removing to the FLUSHALL command

fixes dragonflydf#3532

---------

Signed-off-by: Stepan Bagritsevich <bagr.stepan@gmail.com>
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-30 08:26:14 +03:00
Roman Gershman
20336805f3
chore: enable experimental_new_io by default. (#3605)
* chore: enable experimental_new_io by default.

It has been running for weeks with the flag on, so enabled it also for community.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-08-29 23:30:26 +03:00
Roman Gershman
fa2d67b8a8
fix: xreadgroup replies as a map for RESP3 (#3576)
* fix: xreadgroup replies as a map for RESP3

Moreover, it returns data for all the strings, irrespective whether they have results or not
(unlike with XREAD)

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

* fix: properly handle xpending with 0 results

Also reject ENTRIESREAD instead of silently accepting it.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-29 20:05:57 +00:00
dependabot[bot]
d6378bc43b
chore(deps): bump google.golang.org/protobuf from 1.26.0 to 1.33.0 in /contrib/charts/dragonfly (#3604)
chore(deps): bump google.golang.org/protobuf

Bumps google.golang.org/protobuf from 1.26.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 16:41:08 +03:00
dependabot[bot]
e8a8d534f9
chore(deps): bump gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0 in /tools/replay (#3603)
chore(deps): bump gopkg.in/yaml.v3 in /tools/replay

Bumps gopkg.in/yaml.v3 from 3.0.0-20210107192922-496545a6307b to 3.0.0.

---
updated-dependencies:
- dependency-name: gopkg.in/yaml.v3
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 16:40:37 +03:00
dependabot[bot]
97e53a029c
chore(deps): bump golang.org/x/net from 0.7.0 to 0.23.0 in /contrib/charts/dragonfly (#3601)
chore(deps): bump golang.org/x/net in /contrib/charts/dragonfly

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.7.0 to 0.23.0.
- [Commits](https://github.com/golang/net/compare/v0.7.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 15:46:53 +03:00
Roman Gershman
b74bd5a7b2
fix: JSON.STRAPPEND (#3597)
* fix: JSON.STRAPPEND

JSON.STRAPPEND was completely broken.

First, it accepts exactly 3 arguments, i.e. a single value to append.
Secondly, the value must be a json string, not the regular string. Meaning it must be in double quotes.
So, before we parsed: `JSON.STRAPPEND key $.field bar` and now we parse:
`JSON.STRAPPEND key $.field "bar"`

In addition fixed the behavior of JSON.STRLEN to return "no such key" error in case the
json key does not exist and path is specified.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-29 12:29:34 +00:00
Borys
88229cf365
refactor: remove toUpper() from cmd_arg_parser (#3599)
* refactor: remove usage of toUpper() from cmd_arg_parser

* refactor: remove CmdArgParser::NextUpper
2024-08-29 15:19:52 +03:00
dependabot[bot]
72fc0391f0
chore(deps): bump aiohttp from 3.8.4 to 3.10.2 in /tests/dragonfly (#3600)
Bumps [aiohttp](https://github.com/aio-libs/aiohttp) from 3.8.4 to 3.10.2.
- [Release notes](https://github.com/aio-libs/aiohttp/releases)
- [Changelog](https://github.com/aio-libs/aiohttp/blob/master/CHANGES.rst)
- [Commits](https://github.com/aio-libs/aiohttp/compare/v3.8.4...v3.10.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-29 14:03:51 +03:00
Borys
79a80a0b06
refactor: remove double conversion from str to number to str in search (#3591)
fixes #3581
2024-08-29 09:47:41 +03:00
Roman Gershman
0ee52c9d35
chore: remove DflyVersion::VER0 (#3593)
Stop supporting DflyVersion::VER0 from more than a year ago.
In addition, rename Metrics fields to make them more clear
General improvements and fix the reconnect metric.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-28 18:21:53 +03:00
Derick
24b8d3294b
docs(readme): Fix data mistake (#3590)
Update README.md chore: ms

Signed-off-by: Derick <charleszhn@hotmail.com>
2024-08-28 12:22:01 +00:00
Kostas Kyrimis
9c25ca028c
fix: skip test_replica_reconnections_after_network_disconnect (#3589)
* skip the test because it's flaky

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-28 11:11:49 +00:00
Borys
ee1aee8cee
feat: add escaping symbols for tag search (#3578)
* feat: add escaping symbols for tag search
2024-08-28 12:15:23 +03:00