Bumpup logic is moved to OnCbFinish. Previously keys which are going to
be delete were also bumped up but with this change if key doesn't exists
on callback we will skip it.
Closes#4775
Signed-off-by: mkaruza <mario@dragonflydb.io>
We allowed running heartbeat during global transactions. For example, during replication and while transitioning from full to stable sync we unregister and register journal callbacks with a preemption inbetween. If under preemption heartbeat runs, then we loose those journal entries triggering an lsn check failure.
Signed-off-by: kostas <kostas@dragonflydb.io>
* rename StaticSeeder to DebugPopulateSeeder to show intent
* add a DCHECK in debug populate that triggers if there is a registered replica that hasn't reached stable sync
* small cleanup
Signed-off-by: kostas <kostas@dragonflydb.io>
* feat: debug compression <type>
Extend `debug compression` to support value types.
if no type is given, falls back to testing keys compressability.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* Apply suggestions from code review
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
now it looks like this:
```
> docker run --rm ghcr.io/dragonflydb/dragonfly-dev:ubuntu-f767d82 --version
dragonfly f767d82-f767d82ce78ccbc90ddfb525f4ad4bd9aafcfbed
```
fixes#4830
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
- Removes the warning the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion
Signed-off-by: Thomas Camlong <thomas@ajnart.fr>
Loading snapshots from GCP storage requires that sub directory ends with slash so append
if it does not.
Fixes#4833
Signed-off-by: mkaruza <mario@dragonflydb.io>
When a call is made to server, its call count and call time is counted
against the string it was called with, if the user supplied command was
an alias to some other command.
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
* chore(zset_family/score_map): Remove usages of sds
The usages of WrapSds are removed from zset_family calls.
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
redis-cli uses COMMAND DOCS response to set up tab and hints completion.
If we return OK no completion is set up. If we return an error the cli
sets up fallback completion.
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
Test `test_s3_save_local_dir` fails sporadically. Possible explanation is that parallel tests working
with same bucket remove saved snapshot files - to mitigate this now snapshots will be saved
into S3 temp directory.
Closes#4783
Signed-off-by: mkaruza <mario@dragonflydb.io>
* fix(dfly_bench): Extract bounded MOVED error from IO buffer
There could be multiple errors in io buffer which fails to parse
correctly. Extract only one error to handle.
---------
Signed-off-by: mkaruza <mario@dragonflydb.io>
* feat(cluster_mgr): add populate command
We further simplify the code around cluster config
Also - add a command that populates all the cluster ranges in the cluster
using the "populate" command. `--size` and `--valsize` arguments are also added.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* chore: fixes
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* feat(dfly_bench): Handle MOVED slots
Range slots for each shard are managed by ShardSlots object that
is passed to all threads and connections. Each shard endpoint have it's
own interval set containing valid slot ranges. When MOVED error is
received on one connection, that slot will be removed from source
node slot ranges and added to destination node slot ranges.
Boost ICL interval_set container is used to store intervals. Unique lock
is taken during slot move, while for fetching slot we use shard lock.
Signed-off-by: mkaruza <mario@dragonflydb.io>
This mode is compatible with memtier_benchmark, as well as "debug populate ... SLOTS ..."
We can not use it for custom commands since Dragonfly/Redis require a common hash slot for multiple keys.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Now we can support custom Query class when working with bptree,
so we get rid of pointer taggings.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
A command can be aliased by supplying the flag:
--command_alias=__PING=PING
to the server startup.
A map of alias is retained. When finding a command id, first we look up
into the original command map, then if not found there we lookup through
the command alias map. This results in two find operations for an
aliased command.
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
Before: slot merging/splitting logic was mixed with business logic.
Also, slots were represented as dictionary, which made the code less readable.
Now, SlotRange handles the low-level logic, which makes the high-level code simpler
to understand.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>