* fix: do not migrate during connection close
Fixes#2569
Before the change we had a corner case where Dragonfly would call
OnPreMigrateThread but would not call CancelOnErrorCb because OnBreakCb has already been called
(it resets break_cb_engaged_)
On the other hand in OnPostMigrateThread we called RegisterOnErrorCb if breaker_cb_ which resulted in double registration.
This change simplifies the logic by removing break_cb_engaged_ flag since CancelOnErrorCb is safe to call if nothing is registered.
Moreover, we now skip Migrate flow if a socket is being closed.
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* chore: provide plumbing for jsonpath error propagation
Also update re/flex library to the latest version.
Finally, introduce very basic parser test.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* feat: construct Path object
Parse jsonpath and partially fill it with path segments.
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* test(memory): Test memory accounting for all types
* slightly faster
* WIP
* working
* Document
* Update test to use DEBUG POPULATE
* Nothing much
* Working
* fix
* yaml
* explicit capture
* fix ci?
* stub tx
* chore(transaction): Simplify armed state
Remove atomic is_armed variable and turn it into a regular local state flag. This is now possible because we have clearly defined phases with the phased barrier and baton barrier for blocking commands
---------
Signed-off-by: Vladislav <vlad@dragonflydb.io>
InterpreterManager::Reset creates now a new storage for interpreters,
and waits for the old ones to be returned.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Not finished yet, mostly a boilerplate plus minimal bindings for the test.
Motivation: as long as we rely on jsoncons jsonpath implementation we won't be able
to change json implementation as well. jsoncons path is quite qood but it will only
work with jsoncons json library. By implementing this ourselves we will gain the freedom
to change json implementation in the future.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
chore: UpdateHelio dependency
Add support for asan/ubsan checkers in our dev environment.
Remove more clang warnings.
Once we fix all the problems we will enable them in our CI as well.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* If the image.tag version is equal to 14.0.0 or greater then specify the DFLY_requirepass environment variable. Otherwise use the DFLY_PASSWORD environment variable.
Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>
* Corrected version logic and added golden test
Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>
* Updated golden file for TLS + image.tag
Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>
* fix CI for chart linting test
* rename new test specific to password
* use v1.13.0
* update golden chart
---------
Signed-off-by: Michael Primeaux <michael.primeaux@mac.com>
Signed-off-by: Michael Primeaux <mprimeaux@users.noreply.github.com>
Co-authored-by: Tarun Pothulapati <tarun@dragonflydb.io>
Refactor blocking transaction code. Introduce BatonBarrier for managing atomic and exclusive wakeup notifications that don't conflict with neither expiration nor cancelling
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
* feat(server): Add `MEMORY TRACK ADDRESS` command
Given a hex address, it replies with whether or not this address is
currently allocated by mimalloc's backing heap.
* init!
* Add HELP message
* fix: BLOCKING/REVERSE_MAPPING flags for some commands
Also, simplify interfaces around REVERSE_MAPPING in the internal tx code.
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* fix: Remove a stale reference to blocking watch queue
1. Remove the duplicated FinalizeWatched function
2. Identify the case where we delete the watched queue while we may still have awakedened_keys pointing to it.
3. Add a test reproducing the issue of having in awakened_keys an untangled key.
Properly fixes#2514
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Output more info about the state of things.
Skip the non existent key and continue the execution.
Fixes#2514
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Crash was a `CHECK()` failure when renaming to an existing key within
the same shard.
Specifically, the problem was that we ran post updater after deletion,
which is illegal as it could invalidate iterators.
Fixes#2502