Commit graph

959 commits

Author SHA1 Message Date
Roman Gershman
418f529b0e
fix: 'xgroup help' should show help message (#1159)
Along the way, performs small cleanups in command handling code.
XGROUP HELP is special because it falls out of Dragonfly command taxonomy design,
where a command name determines where its key is located. All other XGROUP subcommands
expect to see XGROUP <subcmd> <key> and this one obviously does not need any key.
I fix it by working around the issue and introduce a dedicated dummy command for this combination.

Fixes #854.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-30 09:53:01 +03:00
Roy Jacobson
de0b73312a
chore: Tweak debug symbols generation for releases (#1139)
* chore: Tweak debug symbols generation for releases

* Update helio (for blaze.sh changes)
2023-04-30 09:14:51 +03:00
Chaka
fa39c1890d
feat(server): Add support for PFADD and PFCOUNT (#1152)
* feat(server): Add support for PFADD and PFCOUNT

This version does not create sparse-encoded HLLs, however it is fully compatible with such ones created by Redis as it converts them to the dense encoding.

Note that PFMERGE is not yet implemented.

* Set small string optimization to be 2^13 instead of 2^15.

This will allow dense-encoded HLL to *not* fit within the small string,
which will make it contiguous in memory, thus GetSlice() will not
allocate.

---------

Signed-off-by: chakaz <chakaz@chakaz>
Co-authored-by: chakaz <chakaz@chakaz>
2023-04-30 00:50:11 +03:00
Roman Gershman
b09a36d553
feat: ignore MULTI/EXEC if the transaction consists of EVAL commands (#1157)
feat: ignore MULTI/EXEC if the transaction consists of EVAL commands.

Together with `default_lua_config` solves #781.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-29 13:55:32 +02:00
Rueian
688f8f51a3
feat(server): allow AUTH and SETNAME options in the HELLO command (#1156)
Signed-off-by: Rueian <rueiancsie@gmail.com>
2023-04-28 17:19:40 +02:00
Roman Gershman
494ca14e4e
feat: Extend parsing to field impressions (#1154)
feat: Extend parsing to field impressions.

Add search_parser_test to PR tests.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-28 14:34:03 +03:00
Nick Gottlieb
0651339f79
Update README.md (#1145)
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
2023-04-28 14:33:47 +03:00
Vladislav
432ece3ace
Dispatch queue backpressure and batching (#1118)
Adds backpressure to pubsub

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-28 14:02:55 +03:00
Roy Jacobson
574ae24fec
fix(server): Tweaks for replication info (#1147)
* fix(server): Return strings with underscores instead of spaces for replication states

* Add 'state' field to master info replication command
2023-04-27 15:31:31 +03:00
talbii
0b203629e2
don't listen for TCP connections when --port 0 is passed (#1113)
Disable TCP listening when `--port 0` is passed.

Instead, only unix-socket listening and Admin listening (via TCP) is
enabled.

Fixes #979 and #983.

Signed-off-by: talbii <ido@dragonflydb.io>
2023-04-27 12:41:14 +03:00
romange
e23755d51e chore(helm-chart): update to v1.2.1 2023-04-26 17:41:27 +00:00
Roman Gershman
bf6ee50920
feat: Add unicode support and replace flex with reflex. (#1143)
Also, add basic test with Parser.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-26 17:12:00 +02:00
Roman Gershman
0b13eaa943
fix: remove redundant ToLower call from the HSET function (#1141)
fix: remove redundant ToLower call from HSET function

The call was left during big refactoring when we removed command name from the
arguments slice passed to commands.

Fixes #1140

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-26 10:43:30 +03:00
Roman Gershman
ce5db032fc
chore: support more token types in the lexer (#1134)
1. Support integers
2. Support string literals
3. Add more test coverage.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-25 15:57:24 +03:00
Roy Jacobson
8749d736dd
chore: Update comments and logs after debugging (#1129) 2023-04-25 08:37:23 +03:00
ashotland
6a26d41e90
test(sentinel_test.py): increase timeout in failover test (#1133)
* test(sentinel_test.py): increase timeout from 10 to 15 seconds in test_failover function

Signed-off-by: ashotland <ari@dragonflydb.io>

---------

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-04-24 21:55:11 +03:00
romange
fd7c973ff8 chore(helm-chart): update to v1.2.0 2023-04-24 12:58:54 +00:00
ashotland
6fcd15d1e1
Sentinel test debug (#1125)
Sentinal test debug
- Some more logging
- Use PortPicker

Signed-off-by: ashotland <ari@dragonflydb.io>
2023-04-24 10:53:51 +03:00
Roman Gershman
d78a9daaeb
chore: simplify debian package filename. (#1128)
Currently deployed packages have version in the filename which makes it much harder to fetch
using scripts.

This change fixes the filename and also removes some redundant code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-24 10:05:01 +03:00
Roman Gershman
51c5bb7273
feat: Add skeleton code for parser/lexer generation (#1126)
Add initial test for the scanner.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-24 09:58:20 +03:00
adiholden
7f56a435c4
bug(server): replicate scripts in stable state (#1114)
* bug(server): replicate scripts in stable state

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-04-23 23:46:51 +03:00
Vladislav
2d501111ea
Fix async lua bugs (#1123)
Fix async lua bugs:
- Not calling toupper before looking up command id
- Wrong error reply context
2023-04-23 14:50:25 +03:00
adiholden
c6d34678f3
fix(test): add wait for all replicas to finish (#1124)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-04-23 14:20:01 +03:00
Vladislav
520e66c4b7
fix: replace journal executor reply builder (#1120)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-23 13:27:47 +03:00
Roman Gershman
78a471582f
chore: adding polishes for reading cgroup files (#1121)
Specifically, do not check-fail when reading cgroup file path.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-23 11:06:46 +03:00
Vladislav
ba19cc1047
docs: describe command squashing (#1119)
Signed-off-by: Vladislav <vlad@dragonflydb.io>
2023-04-22 09:02:36 +03:00
Vladislav
74a1454409
Collect errors from async lua calls (#1092)
Error collection from async calls
2023-04-22 09:02:22 +03:00
Vladislav
71147c20a9
Dispatch queue memory optimizations (#1103)
Dispatch queue entry optimizations
2023-04-22 09:02:07 +03:00
talbii
2d73b2bfb0
fix: container limits (#1109)
* added checks to limit memory to container\'s limit
* some fixes, move all logic to a single function
2023-04-21 00:52:16 +03:00
Roy Jacobson
46a2435865
fix(tests): Disable 'dbfilename' unless explicitly given in the test (#1117) 2023-04-20 13:11:49 +03:00
adiholden
3b3350081c
chore: enable self hosted runner (#1116)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-04-20 11:36:04 +02:00
adiholden
9a515cbe67
docs(readme) : doc flagfile (#1110)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-04-20 11:28:22 +03:00
iko1
c2d32f9d68
fix(server): json.set should add missing keys and add missing cmd... (#1065)
fix(server): json.set should add missing keys and add missing command flags

Signed-off-by: iko1 <me@remotecpp.dev>
2023-04-20 11:20:00 +03:00
Roy Jacobson
6632261a2d
fix(server): Prevent preemption inside SerializeBucket (#1111)
* fix(server): Prevent preemption inside SerializeBucket

* Modifications after speaking to Adi
2023-04-20 10:27:47 +03:00
Roy Jacobson
246f6093db
feat(server): Save on shutdown (#1086)
* feat(server): Save snapshot on shutdown

* CR

* Change save on shutdown to be conditional on --dbfilename.

* Support SHUTDOWN [NO]SAVE and fix unit test

* Better wait for DB loading

* Fix DF format loading state bug

* Fix some fallout from auto save
2023-04-20 06:30:42 +02:00
Roy Jacobson
dd97b36965
fix(server): Better error reporting when opening snapshot files (#1112) 2023-04-19 15:34:59 +03:00
Roy Jacobson
1319918476
fix(server): Don't allow directory escapes in dbfilename (#1105)
* fix(server): Don't allow directory escapes in dbfilename

* Just disallow directories completely
2023-04-18 21:21:23 -07:00
Roy Jacobson
002ec8a621
fix(parser): Don't accept NILs as command arguments in server mode (#1101)
* fix(parser): Don't accept NILs as command arguments in server mode
2023-04-18 17:44:36 +03:00
Tarun Pothulapati
2033b671ef
fix(helm): Allow prometheus rules fields to be empty (#1100)
This commit fixes a rendering error where when the rules are
empty, the helm chart fails to render. By using the correct
indentation, the chart will render correctly.
2023-04-18 20:08:51 +05:30
Vladislav
77e18f0463
fix: report errors from commands with redis.call (#1108)
Redis call now directly reports erros
2023-04-18 17:29:07 +03:00
Roy Jacobson
1382ed1c37
chore: Allow passing empty strings as flag arguments in DflyInstance (#1104)
For example, this is needed to disable auto save on shutdown with --dbfilename=""
2023-04-18 12:48:30 +03:00
Roy Jacobson
d9f45f369a
fix(server): Allow interrupting REPLICAOF commands during full sync (#1058)
* fix(server): Allow interrupting REPLICAOF commands during full sync
* fix(server): Fix a race condition and UB in a debug assert
2023-04-18 11:44:44 +03:00
Vladislav
0e7d137046
fix: fix default instance port blocking in pytest (#1102)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-04-18 00:12:38 +03:00
Vladislav
c65073eca9
Refactor connection (#1098)
Refactors dragonfly connection class
2023-04-17 21:02:48 +03:00
Roy Jacobson
c952251381
feat(server): Insert timestamp into snapshot names explicitly (#1028)
* feat(server): Insert timestamp into snapshot names explicitly

* Whenever the snapshot filename contains '{timestamp}', it will be substituted with the current local time.
* Default snapshot name is now "dump-{timestamp}"
* InferLoadFile: Modify to recognize "{timestamp}" files correctly.
* ServerFamily::Load: Change extension 'CHECK' into a non-terminating error because it's user-visible
* ServerFamily::DoSave: Add sanity check for the filename extension.

Signed-off-by: Roy Jacobson <roy@dragonflydb.io>

* resolve CR comments

* Add comment about glob sorted output

* Fix InferLoadFile and fix its tests

* Simplify filename behavior with the .dfs format

---------

Signed-off-by: Roy Jacobson <roy@dragonflydb.io>
2023-04-17 14:59:44 +03:00
Roy Jacobson
cb17f92ad8
feat(server): Support IPv6 addresses for replication (#1087)
* feat(server): Support IPv6 addresses for replication

* break earlier on IPv4
2023-04-17 07:55:11 +03:00
Roman Gershman
e17fb41dee
fix: systemd configuration (#1097)
1. Tune some security directives.
2. Fix the flags file that mistakenly configured dragonfly to store its dump files into /run (tmpfs).

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-16 06:41:02 -07:00
Roman Gershman
74e94ef9bb
feat: add oom insertion rejections (#1096) 2023-04-16 10:23:09 +03:00
Vladislav
b345604226
fix: Remove incremental locking (#1094) 2023-04-15 06:59:19 -07:00
Chaka
023abfa46e
feat(server): Support CONFIG GET [databases|maxmemory] (#1093)
Fix #1046

Signed-off-by: chakaz <chakaz@chakaz>
Co-authored-by: chakaz <chakaz@chakaz>
2023-04-15 11:41:20 +03:00