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>
* 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>
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>
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>
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>
* 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>
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>
* 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
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.
* 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>
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>