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

1375 commits

Author SHA1 Message Date
Roman Gershman
36be222091
chore: add macos daily build (#1795)
It compiles most of the code though some linking problems still exist.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-06 09:35:11 +03:00
romange
b8a9d1f093 chore(helm-chart): update to v1.9.0 2023-09-05 14:33:11 +00:00
Vladislav
05f4895d48
Update Dockerfile.alpine-dev (#1803)
Add missing icu dependency

Signed-off-by: Vladislav <vlad@dragonflydb.io>
2023-09-05 08:44:11 +00:00
Roman Gershman
87a47564ea
fix: add maxmemory_policy item to info memory section (#1802)
Fixes #1800.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-05 10:39:45 +03:00
Roy Jacobson
1963756111
fix: Add missing encodings to strEncoding (#1798) 2023-09-04 21:43:20 +03:00
Roy Jacobson
f94c4bef8b
fix(server): Adjust batching behavior to reduce network latency on MULTI blocks (#1777)
* 1. Add a Yield() call before executing the last command in the async queue when needed.
2. Allow the receive buffer to grow when needed.
3. Improve debugging logs for batching behavior.

* Update helio and use the new epoch interface for deciding on yields.
2023-09-04 15:29:17 +03:00
Roy Jacobson
502f76fada
Enable authentication for the HTTP interface. (#1792) 2023-09-04 15:18:57 +03:00
Vladislav
f1d9ab30ee
feat(search): Query parameters (#1768)
* feat(search): Query parameters

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-03 23:08:25 +03:00
Roman Gershman
cc828f238f
chore: Update double-conversion library (#1793)
Add double to string coversion tests.
Patch the library to avoid using locale - because freebsd c++ lib
does not have this symbol.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-03 16:18:43 +03:00
Roman Gershman
e8bf54e8bb
chore: dragonfly compiles on FreeBSD (#1789)
1. Do not use IOUring on non-linux systems.
2. Improve compatibility of the code for non-linux systems.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-03 14:11:08 +03:00
Vladislav
5af6169729
feat(search): FT.PROFILE (#1787)
* feat(search): Profiling

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-03 12:39:31 +03:00
Kostas Kyrimis
196650a39d
chore(AclFamily): disable flaky tests (#1791) 2023-09-03 09:23:14 +00:00
Kostas Kyrimis
846d421d25
fix(AclFamily): setuser interleaved signed categories update (#1790) 2023-09-03 09:02:32 +00:00
adiholden
ac3b8b2b74
fix(server): Dont apply memory limit when loading/replicating (#1760)
* fix(server): Dont apply memory limit when loading/replicating

When loading a snapshot created by the same server configuration (memory and
number of shards) we will create a different dash table segment directory tree, because the
tree shape is related to the order of entries insertion. Therefore when loading data from
snapshot or from replication the conservative memory checks might fail as the new tree might
have more segments. Because we dont want to fail loading a snapshot from the same server
configuration we disable this checks on loading and replication.

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-09-03 11:24:52 +03:00
Roman Gershman
7c16329ef3
fix: account for huge pages when displaying RSS usage (#1785)
now used_memory_rss is computed correctly.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-02 12:36:56 +03:00
Kostas Kyrimis
68fa3f420b
feat(AclFamily): add acl whoami command (#1774)
* add acl whoami
* add tests
2023-09-01 21:23:01 +03:00
Kostas Kyrimis
6706707585
feat(AclFamily): add acl deluser (#1773)
* add acl deluser command
* add tests
2023-09-01 16:12:02 +00:00
Kostas Kyrimis
9ca7dba143
fix(AclFamily): stream acl updates via dispatch queue in connection (#1786)
There was a bug on updates of the acl categories when squashing was used. Basically, the parent context could be accessed in parallel by the "stub" contexts causing a dreaded data race on the update.

This is fixed by adding a new AclUpdateMessage at the front of the dispatch queue of the connection.
2023-09-01 15:40:50 +00:00
Vladislav
eaedc96dc5
fix(search): return whole json documents (#1782)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-01 12:50:11 +03:00
Roman Gershman
5ef8087a9c
fix: use cd instead of working-directory which does not work (#1781)
fix: use "cd" instead of woarking-directory that does not work

Also, use GITHUB_WORKSPACE due to https://github.com/actions/runner/issues/2058

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-31 23:23:48 +03:00
Roman Gershman
1b1f427c3e
feat: introduce configurable flags for I/O limits (#1776)
Introduced `max_multi_bulk_len` as a max limit when parsing RESP arrays
as well as `max_client_iobuf_len` as a max limit on the iobuf used to
read from a socket.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-31 22:43:54 +03:00
Vladislav
47ef6d1e87
feat (facade): simple argument parser (#1747)
* feat: simple argument parser

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-31 22:03:34 +03:00
Kostas Kyrimis
866b9afe58
chore: remove locks from acl validation in the hot path (#1765)
* remove locking the registry when Validating users
* deep copies the acl categories in the connection context
* streamline updates to the acl categories via the proactor pool
2023-08-31 21:59:42 +03:00
Søren Hansen
7492550f12
fix: run container as dfly user (#1775) 2023-08-31 16:54:50 +00:00
Kostas Kyrimis
4350cf35d7
fix: failing memcached regression test (#1778) 2023-08-31 12:59:50 +03:00
Roman Gershman
f99ed70a14
fix: Add db id to client list attributes (#1770)
Fixes #1767

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-30 16:44:46 +03:00
Roman Gershman
3829e3691e
chore: move rdb save related logic into auxillary file (#1769)
1. No logic was changed during refactoring.
2. Flipped the flag to run regression tests for now own with zset_tree=on

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-30 16:41:17 +03:00
Roman Gershman
63eb219d88 chore: split daily build and bullmq tests (#1766)
Also add fedora linux to daily build matrix.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-30 14:24:52 +03:00
Yue Li
b6b72250ca
fix(zset): correct the wrong calculation of range.maxex (#1759)
fixes #836: correct the wrong calculation of range.maxex.
2023-08-30 13:55:38 +03:00
Kostas Kyrimis
7c43cbf2b5
feat: add validation of acl users (#1743)
* add validation for categories
* add tests
2023-08-29 18:52:46 +03:00
adiholden
2881ca99e4
fix(server): service exit on rdb load fail (#1750)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-08-29 18:25:55 +03:00
Roman Gershman
dbef4ca967
fix: make Dragonfly compatible with older systems (#1755)
Change the Makefile to configure the compile to produce code
compatible with core2 architecture for x86_64 systems.
Plus specify precise CPU extensions that we use in the code.
Partly addresses #1519

Before the change we relied on default helio logic that configured
the build to run on sandybridge for x86_64.
This PR overrides x86_64 settings to much older core2 processor.

Also, we remove an unneeded cmake include.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-29 18:24:29 +03:00
Roy Jacobson
254c86786e
fix(replication): Handle errors instead of crashing. (#1757) 2023-08-29 14:29:40 +02:00
adiholden
d964325f93
bug(server): command stats show origin command name (#1761)
the bug: when command is renamed we show the rename command in command
stats
the fix: print the origin command name in command stats

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-08-29 11:53:44 +00:00
Vladislav
b9a8dabb50
feat(search): named return values (#1746)
* feat: named return values

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-29 08:57:49 +03:00
Kostas Kyrimis
1855c1cd54
fix: broken memcached error reporting (#1741)
* fix DispatchCommand error reporting when memcached protocol is used (one example is when we use SET command on the replica -- previously we crashed now we properly report an error)
* SendError(ErrorReply) moved to SinkReplyBuilder from RedisReplyBuilder
* SendError(OpStatus) moved to SinkReplyBuilder from RedisReplyBuilder
* added tests for SendError(ErrorReply) in RedisReplyBuilder
2023-08-28 17:28:42 +00:00
ashotland
35a5433aac
fix(metrics): add master metric (#1754)
* fix: add master metric

the role metric is hard to work with as it generates two time serieses,
for each of the role label values.

Will remove the role metric once we update the production versions.

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-08-28 19:26:40 +03:00
Roman Gershman
af434cf710
feat: implement CONFIG GET command (#1751)
* feat: implement CONFIG GET command

The command returns all the matched arguments and their current values.
In addition, this PR adds mutability semantics to each config - whether it can be
changed at runtime.

Fixes #1700

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

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-28 19:26:38 +03:00
Joe Zhou
343b3ef800
docs: add snapshot_cron flag in README (English and zh-CN) (#1729)
docs: snapshot_cron
2023-08-27 20:19:22 +03:00
adiholden
901d3fff58
fix(server): rdb loader catch bad alloc (#1748)
While loading rdb snapshot, if oom is reached a bad alloc exception is thrown. Now we
catch it and write warning to log and fali loader.

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-08-27 13:48:41 +03:00
Vladislav
e020f8734b
fix: Run defrag on dbs > 0 as well (#1737)
* fix: Run defrag on dbs > 0 as well

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-27 13:44:31 +03:00
Roy Jacobson
ed845fe526
feat(server): Support limiting the number of open connections. (#1670)
* feat(server): Support limiting the number of open connections.

* * Update helio after the small fix was merged to master
* Don't limit admin connections (and add a test case)

* Resolve CR comments
2023-08-27 11:30:16 +03:00
Roman Gershman
6dd51de9fe
fix: fix memcache bugs (#1745)
1. If the first request sent to the connection is large (2kb or more)
   Dragonfly was closing the connection.
2. Changed server side error reporting according to memcache protocol:
   https://github.com/memcached/memcached/blob/master/doc/protocol.txt#L172
3. Fixed the wrong casting in DispatchCommand.
4. Remove practically unused code that translated opstatus to strings.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-27 11:29:01 +03:00
Vladislav
75fdc16f13
fix: fix defrag stats (#1740)
* fix: fix defrag stats

Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
2023-08-27 11:26:28 +03:00
Roman Gershman
8ebfd15166
fix: extend CI running time (#1749)
Also, add sccache debug log in hope to understand
why we get 0 hits sometimes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-27 10:57:29 +03:00
adiholden
6aaa0ee072
feat(server): support multi eval in lock ahead mode (#1662)
* feat(server): support multi eval in lock ahead mode

1. remove validation to allow multi eval only in global script mode
2. send error if there is a mode conflict when running eval inside multi
3. reset uniqe_keys_ when transaction finishes
2023-08-27 09:13:22 +03:00
Roman Gershman
62a9313a38
fix: the bug where iobuf should be enlarged during the replication (#1744)
If an empty buffer is passed to the socket Recv function - it returns error 103.
Even if we returned success, this would lead to the endless loop since the parser
requires more data to parse the load.
Fixes #1680

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-25 22:38:04 +03:00
Vladislav
f1ac4b0f35
fix: fix index loading (#1742)
* fix: fix index loading

Signed-off-by: Vladislav <vladislav.oleshko@gmail.com>
Co-authored-by: Kostas Kyrimis <kostaskyrim@gmail.com>
2023-08-25 21:24:57 +03:00
Kostas Kyrimis
50545fc176
feat(AclFamily): add AUTH for acl members (#1732)
* Extends AUTH command to authenticate ACL users
* Add tests
2023-08-25 18:56:15 +03:00
Roman Gershman
eaaf2c5287
chore: cover zset over bptree implementation in the CI. (#1736)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-08-25 11:45:17 +03:00