Commit graph

1457 commits

Author SHA1 Message Date
Vladislav
fc0943989e
feat(search): return scores (#1870)
* feat(search): return scores

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-25 10:03:17 +03:00
iko1
19783face5
feat(json): support JSON.GET pretty print options (#1832)
* parse json.get pretty print options

Signed-off-by: iko1 <me@remotecpp.dev>

* finalize json.get sub args
* set indent size to 1 & add unit tests cases

---------

Signed-off-by: iko1 <me@remotecpp.dev>
2023-09-24 17:40:13 +03:00
Vladislav
bb77de7551
fix(regests): Fix port detection with gdb (#1922)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-24 15:42:31 +03:00
Yue Li
bbcfee1d1a
bug(streams): fixing xreadgroup's behavior to be compatible with Redis (#1908)
fixes #1860
2023-09-24 02:32:43 -07:00
Vladislav
9ccdfb4bf1
fix(regtests): filter client setinfo from rewrite log (#1921)
Fix tests failing after client update to 5.0
2023-09-24 10:51:56 +03:00
Roman Gershman
80767c34f9
chore: implement ParseDouble using fast_float (#1920)
Integrate a wonderful library fast_float by Daniel Lemire.
It achieves x2 improvement on x86_64:

BM_ParseFastFloat         663 ns          663 ns      1049085
BM_ParseDoubleAbsl       1358 ns         1358 ns       523853

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-24 09:20:36 +03:00
Vladislav
d8b99dce93
chore(regtest): Update redis dependency (#1915)
* chore(regtest): Update redis dependency

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-23 10:06:21 +03:00
Roman Gershman
14396ce6c2
fix: Actually print fibers from all the threads (#1918)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-23 05:22:43 +03:00
Roman Gershman
4fccda65cf
chore: remove redundant Find calls when inserting into DenseSet (#1917)
A regular DenseSet insertion first checks for uniqueness and then inserts a new element.
Sometimes we know that the new element is new and we can insert it without checking for
uniqueness first.

Also, pass hashcode into internal functions so we could save some hash calls.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-22 22:48:06 +03:00
Shahar Mike
2091f53777
opt(lua): Avoid separate hops for lock & unlock on single shard execution (#1900) 2023-09-22 14:09:17 +03:00
Shahar Mike
8cc448f6b4
opt(server): Call reserve() with correct argument (#1914) 2023-09-22 08:47:49 +00:00
Vladislav
5bc069f37e
fix: Correctly persist vector indices (#1905)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-22 11:29:19 +03:00
Shahar Mike
746738b03f
doc(server): Copy important note from transactions doc to the code (#1913) 2023-09-22 08:15:31 +00:00
Roman Gershman
b1a287b3c9
fix: avoid calling 'sink_->Write()' with an empty buffer (#1912)
fix: avoid calling sink_->Write with an empty buffer

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-22 08:32:11 +03:00
adiholden
36ac31427d
bug(server): global command stalls on server load with pipeline mode (#1909)
* bug(server): global command stalls on server load with pipeline mode
fixes #1797
the bug: global command is not able to schedule into txq when high load pipelined commands. Only after the load finish the global transaction gets scheduled into the txq. The reason for this is when we start a global transaction we set the shard lock and all the transactions start to enter the txq. They compete with the global tx on the order they are inserted into the queue to preserve transaction atomicity. Because the global tx needs to be inserted to all shard queues its chance to schedule with order with all the other transactions is low.
the solution: lock the global transaction inside the schedule in shard, locking closer to scheduling decreases the number of transactions in the queue and the competition on ordering correctly has higher chance now.

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-09-21 13:35:57 +00:00
Roy Jacobson
08ed830d27
fix(server): Flip tcp_nodelay to on by default (#1910)
Signed-off-by: Roy Jacobson <roy@dragonflydb.io>
2023-09-21 15:48:03 +03:00
adiholden
f18b41c666
run regression tests on CI (#1874)
* run regression tests on CI

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-09-21 10:52:52 +03:00
adiholden
6733ae6e69
bug(server): zadd wrong insert when non unique members (#1906)
* bug(server): zadd wrong insert when non unique members

the bug: when calling zadd with non uniq members the server would result
in updating the zset with the higher score instead of the last score
given
f.e
zadd myzset 2 a 1 a
will result in member a score 2 while the expected 1
the fix: if the members in zadd command are not unique than we do not
sort the members. As a result in this case when we dont sort we will not have perfomace optimization on listpack.

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-09-21 09:37:13 +03:00
Vladislav
65fbbdfe07
fix: Better error handling in search algorithm (#1881)
* fix: Better error handling in search algorithm

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-20 16:02:18 +03:00
Roman Gershman
b6f949bf8c
fix: make blocking_controller_test being built on macos (#1903) 2023-09-20 12:14:00 +00:00
Roman Gershman
c612a2be67
chore: Introduce basic deadlock detector for tests (#1896)
Also, fix IOUring dependency issue in tests on non-linux platforms.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-20 14:13:22 +03:00
Roman Gershman
f652e09a4a
chore: optimize BPTreeNode::BSearch (#1891)
Check whether the key is the biggest one before doing the binary search.
Also, avoid using listpacks when we get lots of items to add to zset.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-19 23:02:46 +03:00
Roman Gershman
8d1474aeac
fix: improve performance of listpack sorted sets (#1885)
1. Cherry-pick changes from Redis 7 that encode integer scores more efficiently
2. Introduces optimization that first checks if the new element should be the last
   for listpack sorted sets.
3. Consolidates listpack related constants and tightens usage for listpack.
4. Introduce MEMORY USAGE command.
5. Introduce a small delay before decommitting memory pages back to OS.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-19 19:52:34 +03:00
Kostas Kyrimis
cfd83a66a2
fix(regression-tests): increase waiting delay for df startup (#1893) 2023-09-19 19:42:12 +03:00
Kostas Kyrimis
ea589db4db
feat(AclFamily): add acl dryrun command (#1894)
* add acl dryrun command
* add unit tests
2023-09-19 19:41:52 +03:00
Kostas Kyrimis
b1c0d5c2a9
feat(AclFamily): add acl getuser command (#1884)
* add acl getuser command
* add unit tests
2023-09-19 12:53:45 +00:00
Kostas Kyrimis
9ef7d951af
feat(AclFamily): add acl cat command (#1883)
* add acl cat command
* add unit tests
2023-09-19 12:27:18 +00:00
Kostas Kyrimis
08a22fbb5b
feat(AclFamily): add acl users command (#1882) 2023-09-19 14:57:17 +03:00
Vladislav
a6692a2977
fix: Disable Int<> calls in cmd_arg_parser_test for MacOS (#1880)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-19 11:18:28 +03:00
Vladislav
769f5a19cd
feat: Span-all no-key transactional commands (#1864)
* feat: Span-all no-key transactional commands

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-19 11:10:56 +03:00
Kostas Kyrimis
890761989c
feat(AclFamily): add acl log (#1865) 2023-09-18 20:10:53 +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
Roy Jacobson
db21b735f6
feat(replication): Use a ring buffer with messages to serve replication. (#1835)
* feat(replication): Use a ring buffer with messages to serve replication.

* Fix libraries dep graph

* Address PR feedback

* nits

* add a comment

* Lower the default log length
2023-09-18 13:59:41 +03:00
Roy Jacobson
1e61ec8114
chore: Add a context manager to DflyInstance so we don't forget to close them. (#1873)
* chore: Add a context manager to DflyInstance so we don't forget to close
them.

* Update tests/dragonfly/config_test.py

Co-authored-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roy Jacobson <roi.jacobson1@gmail.com>

---------

Signed-off-by: Roy Jacobson <roi.jacobson1@gmail.com>
Co-authored-by: Roman Gershman <roman@dragonflydb.io>
2023-09-18 13:52:56 +03:00
Roy Jacobson
74d78261fc
chore: Fix regression test after #1569 (#1872) 2023-09-18 12:26:18 +03:00
Roy Jacobson
b55316c0e6
tests: choose open ports randomally (#1569)
* Implement changes to the testing infrastructure to use random ports
* Use psutil to find out the random ports
2023-09-18 10:23:49 +03:00
Kostas Kyrimis
e81b5671b0
fix(Auth): authenticate with any password for default user (#1868) 2023-09-17 13:45:45 +03:00
Roman Gershman
3683cdb99d
chore: build rpm package for the release (#1866)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-16 22:47:56 +03:00
Uku Loskit
7a5fe1adc1
fix: fix json.arrappend not allowing passing JSON objects (#1867)
Signed-off-by: Uku Loskit <ukuloskit@gmail.com>
2023-09-16 12:27:20 +03:00
Roman Gershman
82050248b0
Run unit tests in macos build (#1859)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-15 23:20:37 +03:00
Kostas Kyrimis
bbd4c6b636
feat(AclFamily): add acl commands (#1844) 2023-09-15 14:28:36 +03:00
Kostas Kyrimis
ff079f0af1
fix(ServerFamily): proper initialization of FileSnapshotStorage when replicaof flag is used (#1858)
* fix(ServerFamily): proper initialization of FileSnapshotStorage when
replicaof flag is passed
2023-09-15 09:00:56 +03:00
Andy Dunstall
7bc98e5bd1
feat(snapshot): fix build on macos (#1861) 2023-09-14 18:02:28 +01:00
Andy Dunstall
a8f3764048
feat(tests): unset test DFLY env variables (#1856) 2023-09-13 18:24:48 +01:00
Roman Gershman
0ada51c42a
chore: enable search lib on Apple (#1854)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-13 20:08:33 +03:00
Kostas Kyrimis
0d20005528
fix: dfly_main small typo on unix_socket flag (#1853) 2023-09-13 16:52:44 +03:00
romange
c185a0b6ce chore(helm-chart): update to v1.10.0 2023-09-13 12:08:27 +00:00
Andy Dunstall
02664ee03a
feat(snapshot): add support for snapshot recovery from S3 (#1839)
* feat(snapshot): add support for loading snapshots from s3

* feat(snapshot): improve load error handling and logging

* feat(snapshot): replace const std::string& with std::string_view

* feat(snapshot): replace ServerFamily::Load error with GenericError
2023-09-13 12:28:21 +01:00
Aidarbek Suleimenov
04e88a1381
feat(server): Getting flags from the environment variables (#1810)
* flags from env variables

* querying environment vars

* remove includes

* refactor

* exit for unknown flag with DFLY_ prefix

* reflecting change in the test

* better tests

* refactor + new test case

* refactor test with inner class

* refactor

* revert back test flags as it might affect ci/cd

* fixing flags

* refactor

* remove includes

* refactor
2023-09-13 10:02:38 +00:00
Roy Jacobson
62d32c353e
feat(debug): Adds a DEBUG STACKTRACE subcommand (#1848)
* feat(debug): Add a DEBUG STACKTRACE subcommand to print fibers state

* update helio
2023-09-13 12:51:35 +03:00