Commit Graph

356 Commits

Author SHA1 Message Date
Ryan Russell
1f42926b7b
docs(docker-compose): Explain NAT overhead in docker-compose (#176)
docs(docker-compose): Explain `NAT` overhead in docker-compose overlay vs host networks

Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-25 21:47:31 +03:00
Luca Goslar
1ba767dc97
fix(docker-compose): Fetch actual Docker Compose file and add memlock conf to service (#173)
docs(docker-compose): Fetch actual Docker Compose file
fix(docker-compose): Add memlock conf to service

Signed-off-by: Luca Goslar <47827429+lucagoslar@users.noreply.github.com>
2022-06-23 18:37:17 +03:00
Philipp B
7446b85bb3
feat(actions): bump helm-chart version when new container image is published (#162)
Signed-off-by: Philipp Born <mail@philipp-born.eu>
2022-06-20 20:25:14 +03:00
Roman Gershman
6b7d2a22df
chore(strings): Simplify Set flow (#164)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-19 23:19:42 +03:00
Roman Gershman
da3ae760d5 feat(stream): implement rdb save support for streams
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-18 20:08:09 +03:00
Roman Gershman
2d9370c6b2 chore(doc): add dragonfly/memcached benchmark to README
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-17 16:10:08 +03:00
Roman Gershman
d1d64eb014 feat(streams): implement rdb load for streams
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-17 10:27:46 +03:00
Roman Gershman
07b92841fe fix(zmalloc): fix memory accounting of redis types
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-17 06:38:07 +03:00
Roman Gershman
5505ad00f0
fix(parser): Raise parser limit for array length from 8K to 64K (#158)
Add indication of parser errors to info stats.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-16 22:01:40 +03:00
Roman Gershman
32f47be034
fix(lua): Fix few lua-related bugs (#157)
1. Correctly parse keys for EVAL command.
2. Support PUBLISH within lua.
3. Remove spurious failure in debug-mode with the increased verbosity level.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-16 13:41:09 +03:00
Roman Gershman
46220183ae chore(actions): fix docker release pipeline
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-16 09:00:11 +03:00
Roman Gershman
a1c3d8e33d chore(server): Usability improvements
1. Relax processor requirements for Dragonfly. Fixes #124.
2. Introduce cmake option DF_USE_SSL to allow building DF without SSL support. Fixes #128.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-15 19:20:03 +03:00
Roman Gershman
4ec2538204
fix(transaction): Fix rare deadlock case - fixes #150. (#155)
In rare cases a scheduled transaction is not scheduled correctly and we need
to remove it from the tx-queue in order to re-schedule. When we pull it from tx-queue
and it has been located at the head, we must poll-execute the next txs in the queue.

1. Fix the bug.
2. Improve verbosity loggings to make it easier to follow up on tx flow in release mode.
3. Introduce /txz handler that shows currently pending transactions in the queue.
4. Fix a typo in xdel() function.
5. Add a py-script that reproduces the bug.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-15 16:53:27 +03:00
Ryan Russell
f739300415
chore(issues): Add issue templates with links to Discord/Discussions (#152)
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-15 16:42:26 +03:00
Ryan Russell
55d1c51c8f
docs(readme): Add Discord Channel and Community Link Bar (#151)
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-15 16:41:06 +03:00
Roman Gershman
d37a0bbc29 fix(zset): Properly convert non-c strings to floats.
The old code relied on c strtod function that expected some sort of delimiter
at the end. Coincidently my unit-testing code always passed proper c strings so
strod worked as expected. EVAL passes slices to non-c string and this is why the bug was
discovered via eval call. Fixes #148.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-15 00:43:39 +03:00
Roman Gershman
ebd0d89dba chore(zset): add additional logs for parse errors 2022-06-14 22:45:01 +03:00
Roman Gershman
c23dc1c94c fix(lua): Avoid infinite loop and fix sha compatibility with redis.
Fixes #146 and fixes #147.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-13 23:32:19 +03:00
Roman Gershman
f24005407b fix(actions): Fix pre-release docker pipeline 2022-06-13 08:23:29 +03:00
Acheev Bhagat
8809713139
feat(server): Add support for CPU to Info family of commands (fixes #18) (#143)
Signed-off-by: Acheev Bhagat <acheevbhagat@hotmail.com>
2022-06-12 21:25:09 +03:00
Roman Gershman
d5cd317a13
implement partial streams API (#141)
* feat(stream): implement xrevrange, xrange, xlen, xinfo and xgroup, xdel.
1. add tests that cover xrange,xrevrange and various error states for xadd.
2. Implement 8 stream commands overall. Fixes #59.

* feat(stream): support xadd/maxlen option


Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-12 17:41:01 +03:00
Roman Gershman
15fd451487
fix(parser): Fix wrong parsing of nested arrays. (#140)
Relevant only for client-side parsing. Thus it did not affect production code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2022-06-12 15:49:31 +03:00
Ansore
f7d3f4d640
fix(zset): fixed zrevrange support of WITHSCORES.
Added zrevrange test case zset_family_test.cc.
Fixes #106
2022-06-12 11:21:18 +03:00
Ryan Russell
d0af04d427
docs(PR Template): Add PR Template Enforcing Conventional Commits #107 (#137)
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-12 10:40:17 +03:00
Ryan Russell
a29b66068c
feat(community): Add Conventional Commits; Code of Conduct #107 (#133)
* docs(community): Add Code of Conduct #107

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* feat(pre-commit): Add Conventional Commits `commit-msg` hook #107

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* bug(pre-commit): Fix conventional commits entry to include `contrib/scripts` #107

Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-12 08:21:40 +03:00
Ryan Russell
ff632b1c4b
feat(docker-compose): Add docker-compose.yml #100 (#130)
* feat(docker-compose): Add `docker-compose.yml` #100

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* docs(build-from-source): Include build from source

Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-10 16:30:05 +03:00
Ali-Akber Saifee
e82a378354
Reduce scope of HELLO implementation (#129)
* Reduce scope of HELLO implementation

Only accept protover=2 as a valid argument as that is
the only thing that is supported at the moment. For all
other arguments degrade to 'unknown command'

The previous implementation creates issues for clients
expecting the presence of the HELLO command to also signal
the presence of RESP3 (as technically the command appeared in
redis at the same time as support for RESP3).

It also did not raise any errors when unsupported (or invalid)
arguments were passed to the command (such as AUTH, SETNAME)

* Fix error in test

* Remove unnecessary context in assertion

* Fix construction of unknown command error string

* Fix casing of error string
2022-06-09 21:53:30 +03:00
Roman Gershman
a9c0fa8ea4 Implement basic XADD, XRANGE, XLEN commands.
Covers most funvtionality for #59.
2022-06-08 22:04:49 +03:00
Roman Gershman
819b2f0716 Introduce the initial skeleton code for stream routines
1. Take redis stream code from Redis 7.0 branch (d2b5a579d).
2. Introduce stream_family class and test.
2022-06-08 20:28:52 +03:00
Roman Gershman
e2c52c47a5 chore(actions): Minor improvements to the release scripts. 2022-06-08 14:46:46 +03:00
Roman Gershman
e646209da4 Stability fixes to PUBSUB code 2022-06-08 08:46:48 +03:00
Ali-Akber Saifee
746c04fb9d
Use sum instead of individual counts for channels/patterns (#119) 2022-06-08 05:26:02 +03:00
Ali-Akber Saifee
02bc4425ae
Support Pubsub (P)UNSUBSCRIBE commands without arguments (#117)
* Add tests demonstrating expectations of (p)unsubscribe

- When there are subscriptions the return should contain the count of
  remaining channels or patterns subscribed to
- When there are no subscriptions and no arguments are provided
  a single response containing null for channel / pattern and count = 0
  should be returned
- When there are subscriptions and no arguments are provided
  a response per unsubscribed channel or pattern should be returned

* Update arity of (p)unsubscribe commands

* Lint test

* Handle (p)unsubscribe without arguments

Side effects:
- Extract response construction for (p)sububscribe, (p)unsubscribe
  into private method
- Use UnsubscribeAll, PunsubscribeAll in cleanup

* Fix linting errors

* Replace ternary with explicit if/else

* Simplify setup for (p)unsubscribe tests
2022-06-08 05:09:10 +03:00
Roman Gershman
b855b50fb7 fix(lua): use broadwell architecture when compiling lua for x86_64. 2022-06-08 01:02:33 +03:00
Roman Gershman
1c51a65d25
feat(docker): try increasing a memlock limit in the container (#114)
feat(docker): try increasing a memlock limit in DF container.

This should solve the awkward command overrides in K8S scripts.
Fixes #57.
2022-06-07 14:33:55 +03:00
Roman Gershman
62b6ae48c0 Fix prerelease docker pipeline 2022-06-06 18:32:19 +03:00
Ali-Akber Saifee
2caa2b0df2
Update response to HELLO command (#102)
* Update response to HELLO command

Update response from HELLO command to match the api of redis.

Notes:
- For any protocol version other than 2 an error matching what redis
  returns for !2,3 is returned

* Add test for redis HELLO command

* Extract version building to GetVersion function

* Update contributors file

* Add HELLO command to README readiness matrix

* Revert "Add HELLO command to README readiness matrix"

This reverts commit 069f590ad0.

* Add HELLO command to api_status document
2022-06-06 18:17:40 +03:00
Roman Gershman
1fe3862e57 Update docker pipeline to support pre-releases as well 2022-06-06 16:47:59 +03:00
Philipp B
8297c4635d
Helm chart updates (v0.1.1, init command override, TLS configuration, CRs for ServiceMonitor and PrometheusRule objects) (#105)
* helm-chart: add serviceMonitor

* helm-chart: implement tls

* helm-chart: add prometheusrule

* helm-chart: add parameter to override the container's command

Sample values:

    command:
      cmd:
        - '/bin/sh'
        - '-c'
        - 'ulimit -l unlimited && dragonfly'

    securityContext:
      privileged: true

* helm-chart: bump chart appVersion to v0.1.1 and remove hardcoded latest image.tag
2022-06-06 16:26:00 +03:00
Roman Gershman
ef20178b76
Factor out theAPI readiness matrix into a separate doc (#103)
Factor out API readiness matrix into a separate doc
2022-06-06 15:50:41 +03:00
odedponcz
c070e8a96f
Add FAQ (#64)
* add FAQ file
2022-06-06 11:28:42 +03:00
Zacharya
5ff2a43a1f
Add Promehtues metrics for Grafana close #61 (#85)
* Add Promehtues metrics for Grafana close #61

* remove debug code

* Add doc and Grafana dashboard

* PR comments fixes

* Remove macros
2022-06-05 21:47:56 +03:00
Ryan Russell
4a8644559a
Fix Various Naming Conventions around Subscriber (#87)
* Fix `SubscribeMap`

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* Fix `subscriber_arr`

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* Fix `CopySubscribers`

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* Fix `SubscriberMessagesLen`

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* Fix remaining `subscribe` variants

Signed-off-by: Ryan Russell <git@ryanrussell.org>

* Add Ryan Russell to Contributors

Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-04 05:07:13 +03:00
Roman Gershman
e806e6ccd8 Add unstripped binary to allow optional profiling 2022-06-03 07:49:21 +03:00
Roman Gershman
89baa5bfa0
Fix bugs related to concurrency when saving multiple databases under … (#82)
Fix bugs related to concurrency when saving multiple databases under write load
2022-06-03 00:52:38 +03:00
Roman Gershman
ec9754150f Implement PSUBSCRIBE/PUNSUBSCRIBE commands.
Add minimal tests.
2022-06-02 22:45:56 +03:00
TAKAHASHI Shuuji
8570a12d81
docs: Fix a variable name for bucket in Dashtable section (#80)
In the the `dashtable.svg` diagram, the last segment is denoted by `N` while `K` is used for buckets (like bucket1, bucket2, ..., bucketK).
2022-06-02 14:02:18 +03:00
Philipp B
7ff6e47332
Initial commit for helm chart (#57) (#79)
* Initial commit for helm chart

Includes support for
- persistence for /data (if enabled, a Statefulset is deployed)
- mounting extra volumes (for logs, debugging, whatever)
- initContainers (adjusting the pod's ulimit, possibly)
- passing extra arguments to the dragonfly binary through extraArgs

Squashed commit of the following:

caa91a0 helm-chart: initial commit
7ec9ea5 helm-chart: add extraArgs and update README/TODO
e1da96c helm-chart: add StatefulSet for persistence and update chart README
4d81f8a helm-chart: add liveness+readinessProbe
cdf70b3 helm-chart: add initContainers, extraVolumes and extraVolumeMounts
aed0ef1 helm-chart: update README

* add CONTRIBUTORS
2022-06-02 14:01:26 +03:00
Roman Gershman
d3f598eb88 More printings in rdb_test in order to catch the snapshotting bug 2022-06-02 12:32:10 +03:00
Ryan Russell
a049128ab6
Improving Readability r3 (#75)
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-01 19:31:36 +03:00