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

1958 commits

Author SHA1 Message Date
Roman Gershman
30ce250ab2
chore: Increase disk space in the coverage runs (#2684)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-03-04 15:29:00 +02:00
manojks1999
0081f4de71
Chore: Fixed Docker Health Check (#2659)
* docker_healthcheck_fix

* grep_fix_for_alpine

* added environment variable for healthcheck and changed the port extraction accorfingly
2024-03-04 12:47:18 +02:00
Yue Li
842249bc60
bug(tiering): fix overflow in page offset calculation and wrong hash offset calculation (#2683)
fix overflow in page offset calculation and wrong hash offset calculation
2024-03-04 10:08:22 +00:00
Kostas Kyrimis
1b3594ba35
fix: missing manual trigger for daily sanitizers (#2682)
* add manual trigger for usan/asan workflow
2024-03-04 11:40:01 +02:00
Kostas Kyrimis
f3ba448106
chore: make usan asan optional and enable them on CI (#2631)
* add daily job to run unit tests with asan/usan
2024-03-04 11:00:46 +02:00
romange
cf889486bc chore(helm-chart): update to v1.15.0 2024-03-04 05:54:31 +00:00
romange
d551c2a3d3 chore(helm-chart): update to v1.14.7 2024-03-04 04:24:20 +00:00
Roman Gershman
0c1150956b
chore: add oom stats to /metrics (#2680)
* chore: add oom stats to /metrics

Expose oom/cmd errors when we reject executing a command if we reached OOM state (controlled by oom_deny_ratio flag).
Expose oom/insert errors when we do not insert a new key or do not grow a dashtable (controlled by table_growth_margin).

Move OOM command check to a place that covers all types of transactions - including multi and squashing transactions. 
 
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-03-03 18:01:21 +00:00
adiholden
7c443f3a15
feat(server): introduce table_growth_margin flag (#2678)
* feat(server): introduce table_growth_margin flag

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-03-03 13:02:18 +00:00
Roman Gershman
93debc754c
chore: more fixes for macos (#2677)
1.Add back the search files to MacOs build (linker errors are fixed now).
2. Add default maxmemory argument (if not present already) when launching dragonfly process in regression tests.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-03-02 23:14:33 +02:00
Vladislav
9698f974ea
fix(snapshot): Fix flag access (#2676) 2024-03-01 16:21:57 +03:00
Roman Gershman
7ca45f9feb
chore: update helio dependency (#2674) 2024-03-01 10:30:36 +02:00
romange
7148479965 chore(helm-chart): update to v1.14.6 2024-03-01 02:51:15 +00:00
Borys
e57067d2fb
refactor(cluster): #2652 initiate migration process from CONFIG cmd (#2667)
* refactor(cluster): #2652 initiate migration process from CONFIG cmd
2024-02-29 16:08:53 +02:00
Roman Gershman
f8f213e22f
fix: optionally return float as integer from lua script (#2672)
Redis, due to its old lua enginer and bunch of historic reasons returns floats as integers from lua scripts.
This means `eval "return 42.9" 0` would return 42 as long integer.

Dragonfly supports both integers and floats in its lua engine, returning a precise "42.9" in the same scenario.
RESP2 does not support float types so "42.9" is returned as a bulk string for RESP2 connections. For RESP3, dragonfly
returns 42.9 as a native RESP3 double primitive.

This PR introduces an optional legacy behavior for Dragonfly only for the RESP2 protocol. When the `--lua_resp2_legacy_float` flag is passed,
Dragonfly will round down the double value to the nearest integer and return it as RESP2 native long integer.

Fixes #2664

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-29 15:34:51 +02:00
Shahar Mike
54cb7d5cd0
feat(cluster_mgr): Add support for remote Dragonfly servers (#2671)
* WIP: `cluster_mgr.py` to work with remote targets

* Documentation

* No admin port

* Support different hostname move/migrate

* Fix migrate bug

* Fix typo in --help

* fix test

* self.update_id()
2024-02-29 11:59:54 +02:00
adiholden
7e4527098b
fix(server): client pause work while blocking commands run (#2584)
fix #2576
fix #2661

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-02-28 11:07:03 +00:00
Leonardo Mello
8ef92629c5
feat(generic_family): implement RANDOMKEY command (#2639)
Signed-off-by: Leonardo Mello <lsvmello@gmail.com>
2024-02-27 16:03:21 +02:00
Roman Gershman
cf9f10e94e
chore: fuly cover json_family API with json::Path parsing (#2663)
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-27 14:58:59 +02:00
Vladislav
5ac5e3bdac
fix: replace localhost with 127.0.0.1 in cluster tests (#2665) 2024-02-27 12:53:54 +03:00
Roman Gershman
df39d3a286
chore: move jsoncons path code into dedicated files (#2666)
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>
2024-02-27 11:50:24 +02:00
Roman Gershman
91c299b33e
chore: Del and NUMINCRBY use json::Path (#2655)
* 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>
2024-02-26 14:06:21 +00:00
Kostas Kyrimis
d54f2201ae
feat: add current_fork_perc in info all command (#2640)
* add field current_snapshot_perc (instead of current_fork_perc)
* add field current_save_keys_processed
* add field current_save_keys_total
2024-02-26 11:17:31 +02:00
Roman Gershman
d54b600f31
chore: switch to self-built flatbuffers (#2657)
* chore: switch to self-built flatbuffers

This should solve the linker errors on MacOs build.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-26 10:03:17 +02:00
Vladislav
58f284c4f4
chore: Move CallFromScript log to level 2 (#2656) 2024-02-25 12:25:28 +03:00
Roman Gershman
050649d762
chore: fully switch to dual parsing with json::Path (#2654)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-24 13:26:31 +02:00
Roman Gershman
2b30f69fe3
chore: JSON.GET now works with our own jsonpath (#2653) 2024-02-24 13:23:41 +02:00
Vladislav
5ee61db0f3
feat(connection): Support pipelining with Memcached (#2648)
* feat(connection): Support pipelining with Memcached

Adds support for pipelining to Memcached, enhances Memcached pytests

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-02-23 20:18:25 +03:00
Andy Dunstall
47171c4c8e
fix: fix zmalloc_size on macos (#2646)
* fix: fix zmalloc_size on macos

---------
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Roman Gershman <roman@dragonflydb.io>
2024-02-23 17:39:58 +02:00
Kostas Kyrimis
3d27913c46
fix: data race in save_stages_controller (#2647)
* fix: data race in save_stages_controller
2024-02-23 17:35:20 +02:00
Borys
8771ab32a6
refactor: create one type for slots set #2459 (#2645)
* refactor: create one type for slot ranges #2459
2024-02-23 14:10:42 +02:00
Roman Gershman
bcae2dfb46
a test with flat buffers (#2520)
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>
2024-02-23 13:53:41 +02:00
Roman Gershman
a06d40567b
fix: avoid crashing during the connection traversal (#2651)
* fix: avoid crashing during the connection traversal

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-23 10:12:36 +00:00
Roman Gershman
6fce3fca9f
chore: fix build for MacOs (#2635)
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>
2024-02-22 12:02:20 +02:00
romange
ea98513a30 chore(helm-chart): update to v1.14.5 2024-02-22 08:17:26 +00:00
Shahar Mike
9baf7c2645
fix(streamer): Do not yield from the Traverse callback. (#2638)
* fix(streamer): Do not yield from the Traverse callback.

Yielding inside the callback can move entries within the bucket, which
is unsupported.

* fix
2024-02-21 20:26:16 +02:00
adiholden
9e66ec5833
fix(bug): server crash info memory while saving (#2637)
* bug: crash info memory while saving

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-02-21 13:39:57 +00:00
Kostas Kyrimis
52548fe3a0
refactor: remove goto statements from replica.cc (#2633)
* remove goto statements from replica.cc
2024-02-21 13:02:36 +02:00
Kostas Kyrimis
f32156788e
feat(regTests): upload only failed test logs on ci and clean up logging (#2547)
* 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
2024-02-21 10:35:07 +02:00
thweetkomputer
8fd880c844
fix: crash when using nonexistent global variable in lua (#2627)
fix: check whether key exists in FetchKey()

Signed-off-by: zc <2320092610@qq.com>
2024-02-21 08:50:59 +02:00
Roman Gershman
cbfd5bb7c5
chore: doc_accessors now parse with json::Path as well (#2615)
chore: replace search path parsing with json::Path

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-20 19:58:22 +02:00
romange
8cce14ce85 chore(helm-chart): update to v1.14.4 2024-02-20 16:55:13 +00:00
Roman Gershman
ea6f059b30
fix: provide more context in case we have duplicate keys (#2619)
Partially addresses #2500 and avoid crashing the process.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-02-20 16:04:49 +02:00
Shahar Mike
ebca523166
fix(cluster_mgr): Disable CPU affinity (#2632) 2024-02-20 13:43:17 +00:00
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