Commit graph

992 commits

Author SHA1 Message Date
Roy Jacobson
7887327fd4
fix(server): Set lower timeouts for Replica::ConnectAndAuth() (#1043)
* fix(server): Set lower timeouts for Replica::ConnectAndAuth()

* Restore the timeout after Connect()

* better comment
2023-04-10 08:17:47 +03:00
Roman Gershman
1ee049f902
fix: do not crash when running on WSL1 (#1062)
fixes partially #1056 (the crash part).

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-10 07:43:12 +03:00
Roman Gershman
7985b8100c
fix: implement fiber migrate inside helio (#1061)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-09 22:12:37 +03:00
Roy Jacobson
efe18ef19d
fix: use fibers.h alias for SimpleChannel (#1059) 2023-04-09 18:08:07 +03:00
Roman Gershman
71a4c6dd45
chore: change Dragonfly to use fb2 helio library. (#1049)
It's a bit more efficient than Boost.Fibers due to better integrations
of Fibers with Proactor loop.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-09 16:41:10 +03:00
Roy Jacobson
0cd46b2280
chore: ignore vscode's launch.json (#1054) 2023-04-09 10:22:28 +03:00
Vladislav
c29db83b7e
feat(server): Squashed exec (#1025)
Introduces squashed executor that allows squashing single-shard commands within multi transactions
2023-04-08 23:34:33 +03:00
Vladislav
6e86fa4063
fix(interpreter): Remove converting type checks (#1051)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-08 20:09:56 +03:00
Roman Gershman
2cfe1f84dc
feat: increase the flexibility of how to assign DF threads (#1042)
feat: increase the flexibility of how to assign threads in DF.

Specifically, introduce `conn_io_threads` and `conn_io_thread_start` flags that choose
which threads can handle I/O. In addition, introduce `num_shards` flag that may override
how many database shards exist in dragonfly process.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-07 14:50:25 +03:00
Roman Gershman
64aacfa93e
chore: update helio dependency (#1047)
Remove SocketSource because now FiberSocketBase implements the Source interface.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-07 14:32:32 +03:00
vvhungy
78d4aacd25
(build)allow to compile with a custom OpenSSL installation (#1022)
allow to compile with a custom OpenSSL installation
2023-04-07 08:38:12 +03:00
Vladislav
a4305fe2e2
feat(tests): rand seed flag and output (#1044)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-05 16:22:47 +03:00
Chaka
ee7705a84d
Handle GET parameter for SET command. (#1023)
* feat(server): Handle GET parameter for SET command.

Return previous value, as per Redis, in case GET was specified on SET.

---------

Signed-off-by: chakaz <chakaz@chakaz>
Co-authored-by: chakaz <chakaz@chakaz>
2023-04-04 15:52:27 +03:00
Roy Jacobson
d6e6bcf5a9
feat(server): Better logging for replication (#1041) 2023-04-04 15:47:01 +03:00
romange
905593b47e chore(helm-chart): update to v1.1.2 2023-04-04 09:53:23 +00:00
Vladislav
6d269096df
fix(server): Use connection pool only for regular messages (#1038)
Fixes memory leak
2023-04-03 16:40:33 +03:00
Roy Jacobson
f4d79acbd3
fix(server): Return the replica's port on ROLE command (#1027)
Signed-off-by: Roy Jacobson <roy@dragonflydb.io>
2023-04-03 14:40:22 +03:00
Roman Gershman
c96776a0ed
fix: another pass on fixing namespace imports to support fb2 (#1024) 2023-04-03 11:10:47 +03:00
romange
525eda1f85 chore(helm-chart): update to v1.1.1 2023-04-03 02:49:55 +00:00
Roman Gershman
9b03b2cfd1
fix: update helio dependency (#1030)
Fixes #1029

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-02 23:00:03 +03:00
romange
daf4bae473 chore(helm-chart): update to v1.1.0 2023-04-02 18:10:08 +00:00
Vladislav
1b4d3b42a3
feat(facade): Capturing reply builder (#1001)
Implement capturing reply builder to allow storing command responses and sending them separately, to allow parallel command execution
2023-04-01 19:07:53 +03:00
adiholden
f953946eff
feat(github): add self hosted runner to regression tests (#1016)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-31 19:59:55 +03:00
Chaka
a7d40f3265
LPUSHX and RPUSHX now return 0 size when key does not exist. (#1010)
Fixes #834

Signed-off-by: chakaz <chakaz@chakaz>
Co-authored-by: chakaz <chakaz@chakaz>
2023-03-31 19:59:10 +03:00
Roman Gershman
5f417126c8
fix: compatibity with older linux distributions (#1019)
Needed to build on CentOs7

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-31 18:01:22 +03:00
Roman Gershman
0cbd5f0348
chore: remove fiber related names from the codebase (#1018)
Remove Boost.Fibers mentions and remove fibers_ext mentions.
Done in preparation to switch to helio-native fb2 implementation.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-31 13:33:20 +03:00
adiholden
9e6857024e
Reset replica flags after stable state fail (#1013)
* bug(replica): reset state after stable state fail

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-30 17:27:23 +03:00
Frédéric Marchand
10e831825a
bug(helm): Fix parsing error with statefulset (#985)
* Fix parsing error with persistence and password secret configuration

---------

Signed-off-by: Frédéric Marchand <frederic.marchand@kudelskisecurity.com>
Co-authored-by: Tarun Pothulapati <tarun@dragonflydb.io>
2023-03-30 19:07:08 +05:30
Gareth Dwyer
b8b84c0749
docs(readme): Fix up grammar and consistency (#982)
* README.md language edit

Signed-off-by: Gareth Dwyer <sixhobbits@users.noreply.github.com>

---------

Signed-off-by: worktheclock <85885287+worktheclock@users.noreply.github.com>
Signed-off-by: Gareth Dwyer <sixhobbits@users.noreply.github.com>
Co-authored-by: worktheclock <85885287+worktheclock@users.noreply.github.com>
2023-03-30 14:26:14 +03:00
Roman Gershman
c271e13176
chore: import fiber related primitives under dfly namespace (#1012)
This change removes most mentions of boost::fibers or util::fibers_ext.
Instead it introduces "core/fibers.h" file that incorporates most of
the primitives under dfly namespace. This is done in preparation to
switching from Boost.Fibers to helio native fibers.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-30 13:26:59 +03:00
Chaka
1aab8a6934
ZPOPMAX and ZPOPMIN now reply with scores. (#1011)
This is aligned with Redis' behavior.

Fixes #833

Signed-off-by: chakaz <chakaz@chakaz>
Co-authored-by: chakaz <chakaz@chakaz>
2023-03-30 08:46:53 +03:00
Roman Gershman
8e0080133c
fix: add missing barrier to fix reads in the coordinator fiber (#1009)
Fixes #997.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-30 06:55:28 +03:00
adiholden
0312b66244
bug(replication): fix deadlock in cancle replication flow (#1007)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-29 12:11:56 +03:00
ashotland
44c477142a
bug(server): emulate readonly command (#1004)
* bug(server): emulate readonly command

For cluster mode.
Simply retun OK.

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-29 11:51:04 +03:00
Tarun Pothulapati
6ea76e9daa
fix(ci): Use stripped binaries for docker images (#1006)
This PR updates the container release workflow to delete the
unstripped packages so that we prevent the stripped packages from
being overwritten.

This should reduce the size of the container images significantly.
2023-03-29 08:00:28 +03:00
dependabot[bot]
6a8584b4d6
chore(deps): bump redis from 4.3.4 to 4.5.3 in /tests/dragonfly (#1005)
Bumps [redis](https://github.com/redis/redis-py) from 4.3.4 to 4.5.3.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v4.3.4...v4.5.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-03-28 17:27:11 +03:00
adiholden
89da9a99d0
bug(replica): support auth master (#1000)
* bug(replica): support auth master

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-28 12:17:53 +03:00
Lambert Rao
4109529561
docs: add a chinese language readme (#1002)
* add a chinese language readme
2023-03-28 09:28:32 +03:00
Vladislav
139e56b588
feat(server): Pubsub updates with RCU (#980)
Implements RCU (read-copy-update) for updating the centralized channel store.

Contrary to old mechanism of sharding subscriber info across shards, a centralized store allows avoiding a hop for fetching subscribers. In general, it only slightly improves the latency, but in case of heavy traffic on one channel it allows "spreading" the load, as the single shard no longer is a bottleneck, thus increasing throughput by multiple times.

See channel_store header for implementation details
2023-03-26 13:04:23 +03:00
Vladislav
0c83b09aea
fix(server): Fix hset buffer bug (#994)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-03-26 12:53:09 +03:00
Vladislav
72f67eddd8
refactor(facade): Refactor reply builder (#991)
Refactor RedisReplyBuilder to simplify method overloads
2023-03-26 12:52:40 +03:00
Roman Gershman
ef4062d817
fix: improve connection affinity heuristic (#987)
fix: improve connection affinity heuristic.

1. fix potential crash bug when traversing connections with client list
2. fetch cpu/napi id information when handling a new connection.
3. add thread id (tid) and irqmatch fields to client list command.
4. Implement a heuristic under flag that puts a connection on the
   CPU id that handles the IRQ queue that handles its socket.
   However, if a too wide gap introduced between number of connections on
   IRQ threads and other threads we fallback to other threads.
   In my tests I saw 15-20% CPU reduction when this heuristic is enabled.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-25 23:00:27 +03:00
Roman Gershman
32f2f4b72a
fix: list_family_test works with async client (#992) 2023-03-25 21:28:29 +03:00
Roman Gershman
3939da1069
fix: Adapt json_test to async_client (#990) 2023-03-25 16:05:30 +03:00
Chaka
7be98d906d
bug(server): Fix crash in ZPOPMIN (#977)
* Fix crash in ZPOPMIN

Crash was due to an attempt to access nullptr[-1], which is bad :)

* Add test to repro crash.

There's some leftover debugging statements, they're somewhat useful so I
kept them as the bug is not yet fixed.

* Copy patch by romange to solve the crash

Also re-enable (uncomment) the test in utility.py.

Signed-off-by: chakaz <chakaz@chakaz>

---------

Signed-off-by: chakaz <chakaz@chakaz>
Signed-off-by: Chaka <chakaz@users.noreply.github.com>
Co-authored-by: chakaz <chakaz@chakaz>
2023-03-25 10:05:41 +03:00
Ikko Eltociear Ashimine
82121a205b
docs(rdb): fix typo (#989)
peform -> perform

Signed-off-by: Ikko Eltociear Ashimine <eltociear@gmail.com>
2023-03-25 09:08:39 +03:00
Roman Gershman
52ac06e358
chore: Improve client connection checking in pytests (#967)
Also fix the compatibility of "client list" with redis-py client.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-24 18:22:14 +03:00
Roman Gershman
12abe0bc12
chore: update helio dependency (#984)
Also remove direct references for boost fibers from the code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-03-24 18:04:05 +03:00
ashotland
39174f398a
feat(server): Support Resp3 (#975)
Accept hello 3 command and switch to resp3 response format.

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-03-22 12:18:29 +02:00
adiholden
a2fdbc59c2
bug(replication): journal use shard mutex with change callback array (#973)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-03-22 10:48:01 +02:00