It's only a code move, without functional changes.
This is in preparation to implementing the same path functionality
for flexbuffers objects.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* chore: Del and NUMINCRBY use json::Path
Also, fix various protocol bugs when we sent simple string
instead of sending bulk strings.
Fixed a typo in path.cc that lead to a data race bug.
Finally, flip the flag in regression tests to start covering json::Path code
and added test coverage for the data race bug
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* chore: switch to self-built flatbuffers
This should solve the linker errors on MacOs build.
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* feat(connection): Support pipelining with Memcached
Adds support for pipelining to Memcached, enhances Memcached pytests
---------
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
feat: a test with flat buffers
Also, add an experimental flag `--experimental_flat_json` that allows writing json objects as flat strings using
flexibuffers.
The experiment shows that `debug populate 100000 a 10 type json elements 30`
uses almost 3 times less memory than with native jsoncons objects.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Also update actions versions to Node 20.
This change allows dragonfly to be built on MacOs.
However, we still have multiple failing tests on MacOS.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* upload only failed test logs
* remove printing log names for passed tests
* print slow tests with --duration
* separate regression and unit logs for CI workflow
* feat(pytest): More types for seeder
Add more types to the seeder and refactor replication test
---------
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Example usage:
```bash
# Create a 2-node cluster
./cluster_mgr.py --action=create --replicas_per_master=1 --num_master=2
# Move (no migration) all slots to first node
./cluster_mgr.py --action=move --target_port=7001 --slot_start=8192 --slot_end=16383
# Fill data - like run memtier
# Migrate all slots to 2nd node. One could measure how long this step takes.
./cluster_mgr.py --action=migrate --target_port=7002 --slot_start=0 --slot_end=16383
```
The bug: crash when starting replica while saving
The problem: accessing the wrong allocator on snapshot class destruction as it was destructed not in the thread of the shard
The fix: call snapshot destructor when we finish snapshot on the correct thread
Signed-off-by: adi_holden <adi@dragonflydb.io>
Specifically, allows expressions in the form of
`max($.objs[*].score`, i.e. where a function aggregates 0 or more values
produced by the path expression. The final value is passed to a PathCallback.
In case no matches are found, json null value is passed. In any case, the callback
is called exactly once for such expressions.
In addition, fixed a parser bug that does not allow fields after the bracketing expression.
Finally, introduced an utility function for easier parsing of json::Path.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* chore(transaction): Untie scheduling from multi status
Idea: We decide whether we have to schedule not based on our multi status (atomic multi), but solely based on the fact if COORD_SCHED is set
Goal: Being able to use ScheduleSingleHop()/Schedule() for multi transactions, and thus later allow single hop multi transactions
---------
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Fix linker dependencies - now dfly_core depends on jsonpath.
jsonpath does not depend on CompactObject anymore.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
No functional changes are made.
This change is needed to allow traversal functionality that will mutate json object during the traversal.
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
* feat: wire json::Path into the server
The feature is disabled under a flag and it covers read operations for now.
---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>