Commit Graph

67 Commits

Author SHA1 Message Date
Vladislav
f4ea42f2f6
chore: simple traffic logger (#2378)
* feat: simple traffic logger

Controls: 
```
DEBUG TRAFFIC <base_path> | [STOP]
```
---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Roman Gershman <roman@dragonflydb.io>
2024-01-10 12:56:56 +00:00
Roman Gershman
c7db025a48
feat: expose fiber responsiveness metrics (#2125)
Should allow track caches where Dragonfly is not responsive to I/O
due to big CPU tasks. Also, update the local grafana dashboard.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-05 16:56:33 +02:00
Roman Gershman
5c6aad20c1
fix: local grafana dasboard (#2124)
The dashboard used `dragonfly_up` metric to boostrap itself
but this metric does not exist anymore. I replaced it with `dragonfly_version`
In addition, the exported format changed slightly because I used the
recent grafana version to export.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-04 18:34:19 +00:00
Yue Li
00f1e3d578
feat(server): perform eviction upon memory pressure in cache mode (#2084)
* fixes #1936

Eviction Implementation
This patch provides a very simple eviction implementation for the interface mentioned above. In my opinion, the eviction algorithm approximates an LRU policy given that normal buckets always store the most recently accessed data while stash buckets are holding less active data.

The algorithm first selects a small set of segments as eviction targets. Starting from the last slot of the last stash bucket in each of the segments, we walk backward to evict key-value pairs stored in each visited slot. The eviction stopped either when a target memory release goal or the max number of evicted key-value pairs is reached. Therefore, we can upper bound the eviction time through the following two parameters that can be set when DF starts.  Note that these two parameters could be retrieved and changed by user through CONFIG GET and CONFIG SET commands.

---------

Signed-off-by: Yue Li <61070669+theyueli@users.noreply.github.com>
2023-11-01 11:11:27 -07:00
Tarun Pothulapati
b1ba29f9c7
fix(ubuntu-prod): Set suexec hash correctly (#2029) 2023-10-16 13:31:20 +03:00
Roman Gershman
c6f8f3882a
chore: add balls and bins simulator (#2001)
* chore: add balls and bins simulator

Signed-off-by: Roman Gershman <roman@dragonflydb.io>

* Update balls_bins.py

Signed-off-by: Roman Gershman <roman@dragonflydb.io>

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-11 01:18:29 +03:00
Roman Gershman
6e76f8e6cc
fix: logrotate for dragonfly logs (#1972)
The new logrotate settings assume that dragonfly closes a log file
once it grows to large. It never rotates file that is currently open for writing.

Specifically logrotate:

1. rotate only log files
2. skip those that are currently open by as process.
3. compresses using zstd which is more cpu efficient than gzip
4. does not truncate/create old files as 0-sized blobs - just renames them

Fixes #1935

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-09 20:08:37 +03:00
Roman Gershman
0be2d98f27
fix: weekly build (#1871)
* fix: weekly build

* Update tools/packaging/Dockerfile.ubuntu-prod

Co-authored-by: Roy Jacobson <roy@dragonflydb.io>
Signed-off-by: Roman Gershman <romange@gmail.com>

---------

Signed-off-by: Roman Gershman <romange@gmail.com>
Co-authored-by: Roy Jacobson <roy@dragonflydb.io>
2023-09-18 14:41:40 +03:00
Roman Gershman
02fff36e3e
Add build_rpm script and rpm spec (#1831)
Also, link stdlib++ and libgcc statically.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-12 10:42:06 +03:00
Vladislav
e0af5fe836
Remove ICU library (#1812)
* chore(search): Replace icu with unialgo

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-06 15:06:38 +03:00
Roman Gershman
4e393cf742
fix: alpine weekly pipeline (#1811)
1. Move docker build files to separate dir from docker script files
   so that they won't be part of build context. Update dockerignore as well
2. Fix lib dependencies for alpine

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-06 08:27:40 +00:00
Vladislav
05f4895d48
Update Dockerfile.alpine-dev (#1803)
Add missing icu dependency

Signed-off-by: Vladislav <vlad@dragonflydb.io>
2023-09-05 08:44:11 +00:00
Søren Hansen
7492550f12
fix: run container as dfly user (#1775) 2023-08-31 16:54:50 +00:00
Vladislav
8b6de914fc
tools: Hash defrag script (#1723)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-08-22 09:11:34 +03:00
Vladislav
5198622a15
feat: Support unicode strings in search (#1698)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
Signed-off-by: Vladislav <vlad@dragonflydb.io>
2023-08-18 15:40:37 +03:00
Roman Gershman
3d6d9d99c7
fix: weekly alpine build (#1555)
Specifiying an exact boost version is not robust.
Also we do not depend on fibers anymore and boost-context is enough.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-07-17 09:03:02 +03:00
Roman Gershman
8c80bd7c5c
chore: tune snyk coverage to ignore test files (#1509)
Also, upgrade the alpine docker image according to Snyk suggestions.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-07-03 11:16:42 +03:00
Tarun Pothulapati
2da32c1066
feat(debian): retain debug symbols in deb package (#1464) 2023-06-22 19:12:10 +03:00
Chaka
6ec9513c60
test(cluster): Extend cluster_mgr.py (#1426)
Now this management script can:
* Create a cluster (before this PR)
* Print an existing cluster configuration
* Shutdown an existing cluster
* Move slots between cluster nodes

To support connecting to a cluster (for all new functions), I had to
change the way admin ports are defined. Instead of having the user
(optionally) specify the first port, they are hard-coded to be the
regular port + 10,000. This is done because we can't detect the admin
port based for an existing cluster (like via `CLUSTER SHARDS`).
2023-06-20 10:13:57 +03:00
Chaka
5659ff6a2d
test(cluster): Add a Cluster Management script (#1390)
This script allows easily setting up a local cluster.

Example invocation:

```
killall dragonfly; ./cluster_mgr.py --num_masters=3 --with_replicas
Setting up a Dragonfly cluster:
- Master nodes: 3
- Ports: 7001...7003
- Admin ports: 8001...8003
- Replicas? True

Starting nodes...
- Log file for node 7001: /tmp/dfly.cluster.node.7001.log
- Log file for node 7002: /tmp/dfly.cluster.node.7002.log
- Log file for node 7003: /tmp/dfly.cluster.node.7003.log
- Log file for node 7004: /tmp/dfly.cluster.node.7004.log
- Log file for node 7005: /tmp/dfly.cluster.node.7005.log
- Log file for node 7006: /tmp/dfly.cluster.node.7006.log

Configuring replication...
- Response for 7004: OK
- Response for 7005: OK
- Response for 7006: OK

Getting IDs...
- ID for 7001: acefdc2da5d397cfcb99239b3c29cbe6ff10d75a
- ID for 7002: a8cc67dfa42e91a94bd7c0903df35d60a39508bd
- ID for 7003: 1ad91af7bd96c89a8da877164b2ebb4cf458cab8
- ID for 7004: d209c3603343e25a18c78bd68304b6d883973bd3
- ID for 7005: bd2b25e95aaf7fdd2b955e50a00093a8272954bf
- ID for 7006: beb5cb07b75c33e3ff938d07725f2688d9bc91e0

Pushing config...
- Push into 7001: OK
- Push into 7002: OK
- Push into 7003: OK
- Push into 7004: OK
- Push into 7005: OK
- Push into 7006: OK
```
2023-06-15 13:02:58 +03:00
Tarun Pothulapati
e62b5a6c13
fix(alpine): Add libxml2 into the build pipeline (#1363)
Fix lack of libxml2
2023-06-07 09:39:57 +03:00
Chaka
6e21686406
Add bison to build process, and libxml2 to runtime (#1308) 2023-05-29 13:19:23 +03:00
Tarun Pothulapati
7e3a8c8b96
fix(docker): Install libxml2 as part of ubuntu Dockerfile (#1239)
Fixes https://github.com/dragonflydb/dragonfly/issues/1238
2023-05-18 13:41:29 +03:00
dependabot[bot]
70d9a79af7
chore(deps): bump redis from 4.3.4 to 4.4.4 in /tools (#1221)
Bumps [redis](https://github.com/redis/redis-py) from 4.3.4 to 4.4.4.
- [Release notes](https://github.com/redis/redis-py/releases)
- [Changelog](https://github.com/redis/redis-py/blob/master/CHANGES)
- [Commits](https://github.com/redis/redis-py/compare/v4.3.4...v4.4.4)

---
updated-dependencies:
- dependency-name: redis
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-17 10:13:59 +03:00
Roman Gershman
d78a9daaeb
chore: simplify debian package filename. (#1128)
Currently deployed packages have version in the filename which makes it much harder to fetch
using scripts.

This change fixes the filename and also removes some redundant code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-24 10:05:01 +03:00
Roman Gershman
e17fb41dee
fix: systemd configuration (#1097)
1. Tune some security directives.
2. Fix the flags file that mistakenly configured dragonfly to store its dump files into /run (tmpfs).

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-04-16 06:41:02 -07:00
Tarun Pothulapati
34aec80e5a
fix(docker): Use the right shebang in healthcheck.sh (#963)
Alpine images don't have bash installed by default, so we need to use
`/bin/sh` instead. This follows the *same existing convention that
we follow in the `entrypoint.sh` script*.

Both ubuntu and alpine images have been tested (i.e healthchecks to
pass) to work with this change.
2023-03-20 08:59:00 +02:00
adiholden
74617c2799
feat(Docker) : add redis tools to docker (#877)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-02-27 20:31:53 +02:00
Roman Gershman
68edcf00df
Add renderer to grafana (#739) 2023-02-01 13:26:07 +02:00
Boaz Sade
3360ff1704
feat(action): build debian package for arm64 arch (#719)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-01-24 14:43:47 +02:00
Boaz Sade
ae017dbfdb
feat(build): debian package building fix dependency bug (#702)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-01-18 17:53:06 +02:00
Boaz Sade
be74fa0a5b
feat(actions): add support for debian packaging (#696)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>

Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-01-18 09:29:28 +02:00
Boaz Sade
57e3ec9a81
feat(build): debian package building (#689)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-01-16 17:44:53 +02:00
Roman Gershman
427710e5c4 fix: improvements to caching tool 2023-01-11 15:11:37 +02:00
Boaz Sade
f221c10afb
fix(build): verify build image for releases (#664)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>

Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2023-01-10 15:46:20 +02:00
Devang Jhabakh Jai
f4457be767
feat(tools): Add Zipfian cache testing tool (#640)
* adding cache testing tool

Signed-off-by: Ubuntu <ubuntu@ip-172-31-12-15.us-west-2.compute.internal>
2023-01-07 08:58:00 +02:00
Philipp B
b3228fe3a0
feat(container): make healthcheck tls compatible (#643)
Signed-off-by: Philipp Born <git@pborn.eu>
2023-01-05 13:28:29 +02:00
Roman Gershman
f7e70bc45a
fix(server): version check bugs (#632)
1. Align checked version with the format provided by the endpoint
2. Improve error reporting as well as install ca certificates in the docker file.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-01-02 11:43:06 +02:00
ashotland
f204f1c670
Cache logs player batching (#623)
* feat(tools):cache log player batching all the way optimization

Signed-off-by: ashotland <ashotland@gmail.com>

* feat(tools): cache log player add one last print stats after completion

Signed-off-by: ashotland <ashotland@gmail.com>

Signed-off-by: ashotland <ashotland@gmail.com>
2022-12-30 12:29:11 +03:00
ashotland
cee5af1baf
feat(tools):cache log player batching all the way optimisation (#617)
feat(tools):cache log player batching all the way optimization

Signed-off-by: ashotland <ashotland@gmail.com>

Signed-off-by: ashotland <ashotland@gmail.com>
2022-12-29 16:01:01 +02:00
ashotland
92454c6fc8
fix(tools): cache logs player handle append as redis append (#615)
Signed-off-by: ashotland <ari@dragonflydb.io>

Signed-off-by: ashotland <ari@dragonflydb.io>
2022-12-28 17:04:53 +03:00
ashotland
5638f65226
feat(tools):Cache logs player (#614)
Signed-off-by: ashotland <ari@dragonflydb.io>

Signed-off-by: ashotland <ari@dragonflydb.io>
2022-12-28 14:58:31 +03:00
Philipp Born
98b92a0073 feat: build and publish weekly alpha/development container image
- make use of docker buildx caching when possible (helpful with local docker builds)
- introduce a reusable container workflow which is triggered by docker-release and docker-weekly workflows
- added an alpine-dev Dockerfile
- split release.sh contents into different Makefile targets
- make use of job matrix to build alpine + ubuntu in parallel
- make alpine build optional by checking for Dockerfile presence
-- as the pre-built binaries don't work with alpine, because of glibc <-> musl incompatibilities

Signed-off-by: Philipp Born <git@pborn.eu>
2022-12-26 20:41:53 +02:00
Boaz Sade
8802fb4a3c chore(server): upgrade mimalloc for v2.0.7
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2022-12-26 13:08:54 +02:00
Boaz Sade
3d610ee2d7
feat(server): JSON family using JSON type (#561)
feat(server): json family using json type

Signed-off-by: Boaz Sade <boaz@dragonflydb.io>

Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2022-12-14 19:25:10 +02:00
Boaz Sade
dba4c6bd54
feat(server): active memory defrag test application (#552)
Signed-off-by: Boaz Sade <boaz@dragonflydb.io>

Signed-off-by: Boaz Sade <boaz@dragonflydb.io>
2022-12-13 14:34:32 +02:00
Philipp B
2a67dc307e
feat: add healtcheck for container (#544)
feat: add netcat based healtcheck

(similar to `redis-cli ping`)

Signed-off-by: Philipp Born <git@pborn.eu>
2022-12-07 16:44:07 +02:00
Roman Gershman
77bb34fab5
feat(monitoring): Add docker-compose for local monitoring dashboard. (#246)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-08-20 11:06:11 +03:00
Roman Gershman
448d065647
fix(server): Fix a crash when running "client list" command. (#179)
Also, enhance release script to apply linker optimizations when building the binaries.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-26 17:25:42 +03:00
Roman Gershman
b855b50fb7 fix(lua): use broadwell architecture when compiling lua for x86_64. 2022-06-08 01:02:33 +03:00