Fixes the issue when we are trying to Report the error from JournalStreamer::OnCompletion
that is called from a proactor callback directly from the I/O fiber.
We can not use fiber mutexes in the I/O fiber so we switch to regular mutex and reduce its critical sections
as much as possible.
Should fix the following failure:
2628431732 (step):6:622
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* print categories and commands in lower case instead of capital case
* fix a bug of default user inheriting the wrong acl rules on new connections
* move keys position to be after password when printed from an acl command
* fix(cluster): Wait for flow creation before cancelling it
This subtle bug could appear if a migration fails at exactly the wrong
time:
1. Thread1 creates an outgoing flow and starts the migration
2. Thread1's flow fails for whatever reason
3. Thread1 attempts to cancel all flows
4. Thread2 did *not* yet create its flow
5. Thread1 skips non-existing Thread2 flow
6. Thread2 now creates the flow
7. Upon destruction of entire migration, Thread2's fiber has not been
joined, crashing Dragonfly
The fix is quite simple though :)
Fixes#3139
* split creation and invocation
* chore: Streamer is rewritten with async interface
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* remove acl categories from context and all acl checks
* category assign,ent now assigns all the acl commands for that category to the user
* introduce modification order of acl's per user
* acl rules are now printed in the same order as in redis/valkey
* remove old user_registry_test which was part of the poc
* implement client tracking optout
* fix a bug of allowing client caching no without tracking optout
* fix error message compatibility with redis/valkey
* chore: Introduce pipeline back-pressure
Also, improve synchronization primitives and replace them with
thread-local variations.
Before the change, on my local machine with the dragonfly running with 8 threads,
`memtier_benchmark -c 10 --threads 8 --command="PING" --key-maximum 100000000 --hide-histogram --distinct-client-seed --pipeline=20 --test-time=10`
reached 10M qps with 0.327ms p99.9.
After the change, the same command showed 13.8M qps with 0.2ms p99.9
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* Revert "Revert "chore: get rid of kv_args and replace it with slices to full_… (#3024)"
This reverts commit 25e6930ac3.
Fixing the performance bug caused by applying equality operator
on two spans inside ShardArgs::Iterator::operator==
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Vladislav Oleshko <vlad@dragonflydb.io>
* add partial support for CLIENT CACHING TRUE (only to be used with TRACKING OPTIN)
* add OPTIN to CLIENT TRACKING command
* refactor client tracking to respect transactional atomicity
* fixed multi/exec and disabled squashing with client tracking
* add tests