* feat(server): Allow admin commands in multi
Needed for sentinel support (#706)
Signed-off-by: ashotland <ari@dragonflydb.io>
* feat(server): Add test coverage for multi global commands
Signed-off-by: ashotland <ari@dragonflydb.io>
* code review fixes
Signed-off-by: ashotland <ari@dragonflydb.io>
* Sentinel integration test
Signed-off-by: ashotland <ari@dragonflydb.io>
* PR code reiew follow up
Have lambda return awaitable instead of defining neoff async function
Signed-off-by: ashotland <ari@dragonflydb.io>
---------
Signed-off-by: ashotland <ari@dragonflydb.io>
* feat(server): Allow admin commands in multi
Needed for sentinel support (#706)
Signed-off-by: ashotland <ari@dragonflydb.io>
* feat(server): Add test coverage for multi global commands
Signed-off-by: ashotland <ari@dragonflydb.io>
* code review fixes
Signed-off-by: ashotland <ari@dragonflydb.io>
* Sentinel integration test
Signed-off-by: ashotland <ari@dragonflydb.io>
---------
Signed-off-by: ashotland <ari@dragonflydb.io>
The scenario is described in a unit test that reproduces the issue with high chance.
Also added dragonfly_test in repeat=100 mode to CI.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
on my machine it gave me:
inlined from ‘void dfly::SetCmd::RecordJournal(const dfly::SetCmd::SetParams&, std::string_view, std::string_view)’ at /home/roman/projects/dragonfly/src/server/string_family.cc:494:14:
/home/roman/projects/dragonfly/build-opt/_deps/abseil_cpp-src/absl/container/inlined_vector.h:627:29: warning: ‘cmds’ may be used uninitialized [-Wmaybe-uninitialized]
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1. Before that we did no support a real syntax with <numkey> argument,
now we do.
2. Fix warnings.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
fix(server): fix the bug where we went over maxmemory limit significantly
Reproducible scenario: `zipfantest -c 20000000 -d 2000 -a 0.95 -p 10 -upper_bound 2000000` when
dragonfly runs with: `--maxmemory=1G --cache_mode --proactor_threads=2`
1. Inside CanGrow() check we did not account for the additional segment when doing the test against
the memory budget.
2. Our soft budget limit was too low, preventing more detailed checks to stop the allocation.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
chore(facade): speed up request allocation in pipeline mode.
Use an array to cache already allocated requests and reuse them.
Reduces cpu usage for requests that require more than 256 bytes.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
EvictObjects is trigerred when Dragonfly uses more memory than it is supposed to.
However, it decreases the quality of the original eviction policy, and since
Dragonfly does not use much memory than required, I decided to disable it.
A regular eviction policy (DashCache) was not changed.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>