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

2749 commits

Author SHA1 Message Date
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
Kostas Kyrimis
9d68d8f741
fix: warning as error on sanitizers build (#3587)
* disable implicit capture by this

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-28 08:30:42 +00:00
Roman Gershman
59068c3f8e
feat: add oom_deny_ratio to mutable config (#3585)
Also order other configuration variables alphabetically.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-28 06:24:20 +00:00
Roman Gershman
dc040b53ad
fix: return an error when invalid number of arguments is passed. (#3584)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-28 06:20:29 +00:00
Stepan Bagritsevich
832b79563d
fix(json_family): Fix JSON.GET crash for the multiple legacy mode paths (#3582)
fixes dragonflydb#3558

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-27 16:20:34 +00:00
Stepan Bagritsevich
f4fd0f1a07
fix(json_family): Fix json get crash due to an invalid json path (#3580)
fixes dragonflydb##3558

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-08-27 16:35:54 +02:00
Roman Gershman
80e1dbb304
chore: allow running dragonfly pytests in repeat (#3577) 2024-08-27 11:35:47 +03:00
Eunoia
cfb9fdab34
feat(generic_family): Implement EXPIRETIME and PEXPIRETIME commands (#3524)
Introduce EXPIRETIME and PEXPIRETIME commands
2024-08-26 15:55:24 +00:00
Kostas Kyrimis
839b1be82d
chore: add -Wthread-analysis and annotate (part 1/2) (#3502)
* enable -Wthread-analysis
* add missing annotations
* small fixes

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-26 18:22:38 +03:00
Kostas Kyrimis
238bf3ee85
fix: disable test_cluster_flushall_during_migration (#3573)
* disable test_cluster_flushall_during_migration
2024-08-26 17:50:49 +03:00
Kostas Kyrimis
450ec7549b
fix: disable failing test_cron_snapshot_failed_saving (#3571)
* disable test_cron_snapshot_failed_saving

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-26 12:20:34 +00:00
Roman Gershman
908290a268
chore: improve compatibility of set and ping commands (#3569)
* chore: improve compatibility of set and ping commands

smismember should return an array of longs and not array of strings.
ping in subscribe mode returns an array for resp2.
Also, fix double rounding for legacy float mode.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-26 13:33:03 +03:00
Vladislav
10816b500f
chore(search): Silence query parser error (#3570) 2024-08-26 13:03:16 +03:00
Kostas Kyrimis
9c3d69e0ec
fix: delete empty dense sets in HGetGeneric (#3543)
* remove DelEmptyPrimeValue
* delete empty dense set in HGetGeneric
* const qualify FindReadOnly

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-08-26 11:33:57 +03:00
Vladislav
b7eccad5bd
chore(transaction): More blocking tests (#3546) 2024-08-26 10:02:08 +03:00
Vladislav
789603d1a7
chore(server): Unify zset boolean operations into single function (#3567) 2024-08-26 10:01:58 +03:00
Vladislav
fce7970ad7
chore(server): Sort correctly in ZINTER (#3566) 2024-08-25 23:43:52 +03:00
Roman Gershman
20b8817148
fix: compatibility around list,string and sort commands (#3568)
1. Fix corner cases around non existing keys
2. Fix matching logic for * glob, as well as '' glob.
3. Improve SORT option parsing.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-25 16:30:55 +03:00
Vladislav
067fdd83b9
chore(server): Unify zset arg parsing (#3563) 2024-08-25 11:55:10 +03:00
Roman Gershman
be822ae9e1
fix: compatibility around list and string commands (#3565) 2024-08-25 10:41:25 +03:00
Vladislav
1646e90923
fix(server): Fix ZRANGEBYLEX limit params (#3562) 2024-08-25 09:21:49 +03:00
Roman Gershman
caf677ea76
fix: string compatibility issues (#3564)
1. strlen should return 0 for non existing types.
2. reject both EX and PX options in SET
3. prevent overflow of expiry time that is too large

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-08-25 08:08:14 +03:00
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