1
0
Fork 0
mirror of https://github.com/dragonflydb/dragonfly.git synced 2024-12-14 11:58:02 +00:00
Commit graph

1914 commits

Author SHA1 Message Date
Kostas Kyrimis
a1950038b6
fix: loading state error type to be compatible with redis (#2629)
* add -LOADING prefix for loading errors
* replace -ERR with -LOADING for loading errors
2024-02-20 12:45:41 +00:00
Vladislav
75eaeb32db
feat(pytest): More types for seeder (#2577)
* feat(pytest): More types for seeder

Add more types to the seeder and refactor replication test

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-20 15:31:08 +03:00
Shahar Mike
c7750b9d58
feat(cluster_mgr): Add support for migrate action (#2626)
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
```
2024-02-20 13:58:13 +02:00
Shahar Mike
ebe83c820c
test: Run slow tests in regression runs (again^2) (#2623)
* test: Run slow tests in regression runs (again^2)

* better comment
2024-02-20 13:57:40 +02:00
adiholden
1ef8795611
fix(bug): crash when starting replica while saving (#2618)
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>
2024-02-20 10:50:46 +00:00
Shahar Mike
5f3e9a88c9
test: Run slow tests in regression runs (again:) (#2616) 2024-02-19 20:44:11 +02:00
Borys
491538e170
feat(cluster): #2448 add new DFLYMIGRATE ACK cmd (#2582)
* feat(cluster): #2448 add new DFLYMIGRATE ACK cmd
2024-02-19 19:21:14 +02:00
Leonardo Mello
07a8411ee7
fix(server_family): GetMetrics should show commands in lowercase (#2601)
* replace with lowercase cmdstat_info and cmdstat_replconf

Signed-off-by: Leonardo Mello <lsvmello@gmail.com>
2024-02-19 18:50:59 +02:00
adiholden
15b3fb13b6
fix(server): saving is not a server state (#2613)
* fix(server): saving is not a server state

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-02-19 15:20:48 +00:00
Kostas Kyrimis
58dda3bc4b
fix(rdb_load): EnsureRead(min) requesting more bytes than min (#2604)
* fixes EnsureRead(min) to request exactly min bytes
2024-02-19 14:41:25 +02:00
Vladislav
d035111bed
fix: fix cluster test (#2612)
* fix: fix cluster test
2024-02-19 11:03:04 +03:00
Roman Gershman
c8332edfa9
chore: allow aggregate functions for jsonpath (#2611)
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>
2024-02-19 10:02:15 +02:00
Roman Gershman
e7c96925be
chore: clean up redis code (#2614)
Remove unused redis files and file parts.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-19 08:38:21 +02:00
Roman Gershman
fa75360227
chore: get rid of object.c and robj* in cc code (#2610)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-18 16:52:23 +02:00
Roman Gershman
417ca952d6
add loadtest benchmarking program (#2603)
* feat: add loadtest skeleton
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: shahar <shahar@dragonflydb.io>
2024-02-18 16:51:38 +02:00
Roman Gershman
750f039316
Add mutate method to jsonpath (#2606)
* Add mutate method to jsonpath

Plug it in into OpToggle op.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-18 16:06:33 +02:00
Vladislav
1b51e82e55
chore(transaction): Add debug stats for fail printing (#2600)
* chore(transaction): Add debug stats for per shard data

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-18 15:36:14 +03:00
Vladislav
4d4fed6fec
chore(transaction): Untie scheduling from multi status (#2590)
* 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>
2024-02-18 12:25:57 +03:00
Roman Gershman
d802a2181a
chore: consolidate json code under core/json (#2609)
Fix linker dependencies - now dfly_core depends on jsonpath.
jsonpath does not depend on CompactObject anymore.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-18 09:22:34 +00:00
Roman Gershman
1ba59e9179
chore: remove ImportRObj routine and reduce reliance on object.c (#2607)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-18 10:07:00 +02:00
Roman Gershman
6aafe3dc5e
chore: cleanup of redis implementation of sets/hashmaps (#2605)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-17 18:35:28 +02:00
Roman Gershman
3ec56452f9
chore: refactor DfsItem to allow mutability semantics (#2602)
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>
2024-02-16 10:13:20 +02:00
Roman Gershman
888a437bf5
wire json::Path into json_family (#2587)
* 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>
2024-02-15 17:05:53 +00:00
Roman Gershman
1e06c63727
feat: Add dbfilename to config registry (#2598)
Also make "dir" read-only parameter.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-15 18:00:36 +02:00
Roman Gershman
f847a3f4cd
feat: support descent path operator (#2594)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-15 15:03:07 +02:00
Vladislav
bbbcddfdd6
chore(transaction): Copy poll flags (#2596)
* chore(transaction): Copy poll flags

Copying poll flags prevents concurrent data access to PerShardData::local_mask when dispatching poll tasks
---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-15 11:55:02 +03:00
Shahar Mike
28800df071
fix(test): Use less memory for STRING and HASH memory tests (#2593)
While at it, also register the opt_only mark
2024-02-15 10:08:45 +02:00
Roman Gershman
ded3341b3d
chore: add jsonpath evaluate (#2586)
* chore: add jsonpath evaluate

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-14 16:51:42 +02:00
Shahar Mike
f921050298
fix(test): Unflake GenericFamilyTest.Time*Keys (#2592) 2024-02-14 15:24:42 +02:00
adiholden
32e8d49123
feat(tiering): add background offload step (#2504)
* feat(tiering): add background offload step

Signed-off-by: adi_holden <adi@dragonflydb.io
2024-02-14 14:28:41 +02:00
Shahar Mike
b18fe8c0a8
test(cluster): Fix and uncomment counter sanity checks (#2591) 2024-02-14 14:06:34 +02:00
Roman Gershman
ca23d72b08
feat: add descent operator to jsonpath parser (#2588)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-14 13:23:57 +02:00
Shahar Mike
165adc8f87
fix(test): Apply pytest filter to regression tests as well (#2589) 2024-02-14 12:27:29 +02:00
Vladislav
4e3be726c5
chore(pytest): Refactor snapshot test (#2583)
* chore(pytest): Refactor snapshot test

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-14 12:13:52 +03:00
adiholden
7b61b4a8fe
fix(tiering tests): introduce wait until tieting entries num EQ/GT (#2559)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-02-14 09:59:11 +02:00
Roman Gershman
4afe278487
feat: jsonpath supports index/wildcard expressions (#2578)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-12 18:38:05 +00:00
Tarun Pothulapati
21e725774c
feat(release): Also bundle dragonfly-debug builds (#2424)
* feat(release): Also bundle dragonfly-debug builds
2024-02-12 18:25:23 +02:00
Roman Gershman
b3b9080901
chore: fix fiber types in the codebase (#2574)
Reduce reliance on core/fibers

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-12 16:29:28 +02:00
Roman Gershman
4000adf57f
fix: do not migrate during connection close (#2570)
* 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>
2024-02-12 16:03:34 +02:00
Shahar Mike
6d11f86091
test(cluster-migration): Fix some bugs and add cluster migration fuzzy tests (#2572)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Co-authored-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-12 13:47:34 +02:00
Roman Gershman
6cd2f05a22
chore: provide plumbing for jsonpath error propagation (#2567)
* 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>
2024-02-12 13:24:31 +02:00
Roman Gershman
9802f2c489
chore: use helio MPSCIntrusiveQueue queue (#2573) 2024-02-12 10:40:37 +00:00
adiholden
e66e670a6e
chore(server): replica not accumulate multi commands untill exec (#2557)
* chore(server): replica not accumulate multi commands untill exec

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-02-12 10:33:33 +02:00
Roman Gershman
24fcf8d883
chore: Recognize exit status in regression tests (#2571)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-12 09:03:56 +02:00
Shahar Mike
8ead569b2f
test(memory): Unaccounted memory test + add DEBUG POPULATE TYPE <type> (#2561)
* 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
2024-02-12 08:09:48 +02:00
Vladislav
963023f07c
chore(transaction): Simplify armed state (#2508)
* 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>
2024-02-11 12:06:36 +03:00
Kostas Kyrimis
795d00021d
fix: asan errors on unit tests (#2564)
* fix: asan errors on unit tests
2024-02-10 19:48:00 +02:00
Vladislav
815976c9dc
chore: Remove manual memory management from stats (#2550)
Simplift stats memory management

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-10 10:30:30 +03:00
Roman Gershman
908efff7bd
fix: make sure SCRIPT FLUSH concludes (#2565)
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>
2024-02-09 18:55:14 +02:00
Vladislav
881edb501e
feat(pytest): Gen2 seeder, part 1 (#2556)
* feat(pytest): Gen2 seeder

Implement new seeder that uses lua scripts to improve performance

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-09 19:20:25 +03:00