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

2558 commits

Author SHA1 Message Date
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
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