Specifically, provide a total length over all shards of pending txs.
Also, provide number of "free" transactions pending in the queue -
those that could progress immediately but do not because
they are not first in the queue.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
fix(zset): Make count optional for zpop{min,max}
The commands should allow count to be optional and
default to 1 as per the official redis command documentation.
Additionally update command flags to write + fast
Signed-off-by: Ali-Akber Saifee <ali@indydevs.org>
feat(server): Basic multi transaction modes
This commit adds the notion of multi transaction modes that allow controlling the execution and
locking behaviour of multi transactions.
In general, there are four modes:
- GLOBAL: all commands run within a global transaction. There is no need for recording locks. Lua scripts can theoretically run with undeclared keys.
- LOCK_AHEAD: the transaction locks all keys ahead likewise to a regular transaction and schedules itself.
- LOCK_INCREMENTAL: the transaction determines what shards it has keys in and schedules itself on those shards, but locks only when accessing a new key. This allows other transactions to run ooo alonside with a big multi-transaction that accesses a contended key only at its very end.
- NON_ATOMIC: all commands run separately, no atomicity is provided, likewise to a pipeline
This commit only adds support for the first 3 modes to EXEC commands.
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
* Ditch docker whcih is complex on CI in favour of local redis binary
Signed-off-by: ashotland <ari@dragonflydb.io>
* Fix typo
Signed-off-by: ashotland <ari@dragonflydb.io>
* Wait for sentinel termination
Signed-off-by: ashotland <ari@dragonflydb.io>
---------
Signed-off-by: ashotland <ari@dragonflydb.io>
* feat(server): Enable overriding --requirepass form env var
Signed-off-by: ashotland <ari@dragonflydb.io>
* Change precednce order
Elaborate test
Signed-off-by: ashotland <ari@dragonflydb.io>
* Update helm chart to support passowrd from secret
Using recently added capability of setting dragonfly passowrd with the
DFLY_PASSWORD environment variable
Signed-off-by: ashotland <ari@dragonflydb.io>
* rename to existingSecret* + CI file
Signed-off-by: ashotland <ari@dragonflydb.io>
* fix typo in comment
Signed-off-by: ashotland <ari@dragonflydb.io>
---------
Signed-off-by: ashotland <ari@dragonflydb.io>
Now string_map respects the optional ttl argument that accepts ttl time in seconds.
Upon traversing and accessing expirerd elements they will be transparently removed and deleted
from the map.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
chore(server): reduce number of allocations when storing multi-exec commands
This is useful when DF is used to store large blobs and MULTI is used.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Introduce a new flag `df_snapshot_format` that controls the default behavior.
The flag itself is defaulted to save snapshots in a new Dragonfly
specific format.
BREAKING CHANGE: before that Dragonfly saved snapshots in rdb format by default.
Now the flag controls which format is chosen when issuing SAVE/BGSAVE commands.
In addition, "SAVE DF", "SAVE RDB" can be used to save using dragonfly/redis formats
accordingly.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* Add files via upload
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Delete logo-full.svg
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Rename logo.svg to logo-full.svg
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* Update README.md
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
---------
Signed-off-by: Nick Gottlieb <ngottlieb1@gmail.com>
* regression replication will not run on github schedual
* allow running regression replication manually
Signed-off-by: adi_holden <adi@dragonflydb.io>
1. now pipeline_cache_capacity tracks how many bytes are allocated via free_req_pool_ cache.
it's been shown now via "pipeline_cache_bytes" stat in "info memory" command.
2. a small refactoring of server_state code into server_state.cc
3. Reduce dependency of dfly_transaction on facade lib.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1. Remove dangerous check-fail in SegmentAllocator.
2. Allow printing heap stats for both backing and data heaps.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This change allows to track which transactions are run as out of order.
OOO txs are more performant and inhibit substantially less latency.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* bug(transaction): local result needs to be reset on InitByArgs Fixes#752
Signed-off-by: adi_holden <adi@dragonflydb.io>
* add unit test
Signed-off-by: adi_holden <adi@dragonflydb.io>
---------
Signed-off-by: adi_holden <adi@dragonflydb.io>
In addition:
1. improve logging of received commands
2. provide stable ordering of error stats and commandstats
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* Ditch docker whcih is complex on CI in favour of local redis binary
Signed-off-by: ashotland <ari@dragonflydb.io>
* Fix typo
Signed-off-by: ashotland <ari@dragonflydb.io>
---------
Signed-off-by: ashotland <ari@dragonflydb.io>