Specifically get rit of MaskEnum and replace it with explicit bits aliasing the mask.
Reorganize the encoding bits to be able to store 4 states that include huffman encoding.
Solves the first part of #4880
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Allow export/import of huffman tables via
`DEBUG COMPRESSION EXPORT` or `DEBUG COMPRESSION IMPORT <bintable>`
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Remove stash template parameter because we only use dashtable with a single configuration
of STASH_CNT=4.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
cycle clock like most clocks is affected by thread context switching, and maybe this is what causes
test failures. Try to increase the parameter to even further.
Also, add benchmarks for the clock as well as fix some compiler warnings around parser.cc
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
As opposted to the cumulatative one that is shown at the end.
The reason for this: if P99 went up temporarily - it does not go back easily and stays up.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1. Remove one vector (affects allocation and data locality) in squashing.
2. stop deduplicating MGET keys by default, but keep it as a run-time flag.
Also, finally fix TieredStorageTest.FlushAll test.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Generate command with long strings. We will first create number of
random samples that will be used to match keys for which we are generating huge
strings. Total length of huge value string will be divided equally between elements in
generated command.
Closes#4430
Signed-off-by: mkaruza <mario@dragonflydb.io>
* fix(glob): Correctly match longer strings with '*' or '**' pattern
If string is longer than 16 chars we are using reflex library for
matching. When used pattern is '*' or '**' we are going to remove
trailing and leading star and have empty pattern. We should, in this,
edge case set manually star pattern.
Fixes#4948
Signed-off-by: mkaruza <mario@dragonflydb.io>
* Core matching test
---------
Signed-off-by: mkaruza <mario@dragonflydb.io>
1. Fix a crash bug in RESETSTAT when number of shards is less than number of threads.
2. Tune regtests parameters for pipelining tests to pass.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Before: StoredCmd always copied the backing buffer of the commands.
this of course sub-optimal if the bucking buffer exists during the life-time
of StoredCmd. This is exactly the case in `Service::DispatchManyCommands`.
This PR:
1. Adds support for both owned and non-owned arguments.
2. Improves the interfaces around StoredCmd and removes some code duplication.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
1. Eliminate replies reverse call - will allow to unite replies and cmd vectors into one.
2. Introduce SwitchTxCmd function to avoid code duplication.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Fixes#4998.
1. Reduces agressive yielding when reading multiple requests since it humpers pipeline efficiency.
Now we yield consistently based on cpu time spend since the last resume point (via flag with sane defaults).
2. Increases socket read buffer size effectively allowing processing more requests in bulk.
`./dragonfly --cluster_mode=emulated`
latencies (usec) for pipeline sizes 80-199:
p50: 1887, p75: 2367, p90: 2897, p99: 6266
`./dragonfly --cluster_mode=emulated --experimental_cluster_shard_by_slot`
latencies (usec) for pipeline sizes 80-199:
p50: 813, p75: 976, p90: 1216, p99: 3528
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
This is relevant only for cluster-enabled configurations.
Also, inline the cluster config getter functions, as they are on critical path for 100% of requests.
Finally, skip a test that triggers a check-fail bug filed in #5004Fixes#5005
Signed-off-by: Roman Gershman <roman@dragonflydb.io>