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

1487 commits

Author SHA1 Message Date
adiholden
84d4ba4d69
chore(regression): test bptree on regression pytests (#1963)
* chore(regression): test bptree on regression pytests

1. stop passing the flag use_zset_tree as it is true on default
2. fix ci test to run replication tests
3. change replication tests seeder to sometimes add more than 128 values
   to zset to test the pbtree impl

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-10-02 14:07:50 +00:00
Roman Gershman
57441f9863
chore: Print useful info when printing DflyInstance objects (#1977) 2023-10-02 12:02:46 +03:00
Vladislav
bc48bed6ad
fix(regtests): Colored per-instance log (#1971)
* fix(regtests): Colored per-instance log

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-02 10:36:41 +03:00
Vladislav
ee8a661e24
feat(search): Basic sorting (#1941)
* feat(search): Basic sorting

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-10-01 20:27:26 +03:00
Roman Gershman
4be9551806
chore: adjust verbosity level 1 not be over-verbose in prod (#1974)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-01 14:31:39 +03:00
Roman Gershman
43d55fa6d7
chore: rename owner to conn (#1973)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-10-01 10:56:18 +03:00
Andy Dunstall
e6b8cd1d76
feat(cmd): add restricted commands flag (#1967) 2023-09-29 16:16:06 +01:00
Kostas Kyrimis
ba4eba991d
fix(regTests): adjust network disconnect small buffer to pass on (#1970) 2023-09-29 16:50:01 +03:00
Roman Gershman
017b931eba
chore: preallocate lua arrays (#1964)
saves 1-2% due to SetGlobalArrayInternal calls with lots of arguments/keys.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-28 14:09:05 +03:00
Roy Jacobson
4ecab6e786
Add a feature flag for partial_sync (#1957) 2023-09-28 13:15:05 +03:00
Roy Jacobson
7ad29ab919
fix(regtests): Limit infinite loop in replication_test (#1961) 2023-09-28 11:45:03 +03:00
Yue Li
a2457e3410
feat(streams): support entries_read and lag for XINFO GROUPS (#1952)
entries_read and lag have been added to the output of XINFO GROUPS since Redis 7.0. This patch supports both for Dragonfly. This patch also fixes a bug that incorrectly sets the initial value of entries_read when a consumer group is created.

fixes #1948
2023-09-28 01:35:19 -07:00
Roy Jacobson
5c9c9255d2
chore: Small refactor of DflyInstance (#1951)
* Move to its own file
* Unify self.args and self.params.args earlier so it can be inspected.
2023-09-28 10:11:11 +03:00
Kostas Kyrimis
949cedf66c
fix(AclFamily): do not allow to delete default user (#1954)
* do not allow to delete default user
* upon loading an acl file, if default does not exist create them
* add test
2023-09-28 09:22:45 +03:00
Kostas Kyrimis
8dd34b9ce3
fix: small typos on flags (#1953)
* Polish small typos on flags
2023-09-27 15:02:04 +00:00
Kostas Kyrimis
b82825cd6c
fix: test_cancel_replication_immediately (#1942)
* Give enough time to get replication canceled when the CI server is under heavy load
2023-09-27 17:56:26 +03:00
Yue Li
bcdebc35e9
bug(streams): entries_read is not updated on xreadgroup command (#1946)
fixes #1945
2023-09-27 05:03:19 -07:00
Roy Jacobson
ab903612f1
fix(regtests): Bind to 127.0.0.1 and not localhost (#1937)
* fix(regtests): Bind to 127.0.0.1 and not localhost

* Split start into start/serve
2023-09-27 14:58:52 +03:00
Roy Jacobson
fe5c6968ea
chore: Change the DNS log message to something that makes sense externally (#1947) 2023-09-27 13:17:42 +03:00
Yue Li
c47469ed17
feat(streams): support XACK command (#1923)
fixes #1869
2023-09-27 00:14:57 -07:00
Vladislav
b523f35dc9
feat(search): Early limit cutoff (#1943)
* feat(search): Early limit cutoff

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-09-27 09:25:02 +03:00
Roman Gershman
b67e4d8bb6
chore: improve doubles encoding for listpacks (#1938)
chore: reduce double encoding for listpacks

Following memory improvements by Redis 7, use double convrsion library to represent
double values with less space for listpacks.

The change is to use double conversion library instead of plain sprintf inside
zzlInsertAt. This requires to move zzlInsertAt to Dragonfly codebase.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-26 22:24:37 +03:00
Roman Gershman
589ee1cf40
chore: flip default sorted set implementation to bptree (#1933)
Also, bring back the default max listpack entries count for zset to 128.
The reason for this - I've added some optimizations that improved listpack
performance and also because I would like to write an article about it
and I need to compare Dragonfly to Redis7 that has this setting set to 128
by default.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-26 12:41:47 +03:00
iko1
1dbaab564a
fix: set the key index within the json.debug command (#1932)
* fix: set the key index within the json.debug command

Signed-off-by: iko1 <me@remotecpp.dev>
2023-09-26 12:39:42 +03:00
Roy Jacobson
d50b492e1f
feat(replication): First iteration on partial sync. (#1836)
First iteration on partial sync.
2023-09-26 10:35:50 +03:00
Andy Dunstall
d9f4ca8003
fix: macos segfault loading snapshot (#1931) 2023-09-26 07:39:13 +01:00
Roman Gershman
00ee506cc8
chore: performance improvements around zset (#1928)
1. ExpireIfNeeded was unjuistifiedly high in the profile topk table.
   Lets make the initial condition within an inline to reduce its impact.
2. Reserve space for hmap/zset if multiple items are added.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-25 20:04:59 +03:00
Andy Dunstall
9a09b793b4
feat(build): fix lua on mac arm64 (#1930) 2023-09-25 19:31:51 +03:00
Kostas Kyrimis
91e8ead6d1
fix(dragonfly_test): failing bug207 on build opt (#1919)
The issue was that the Heartbeat would run every 1ms and this is problematic because the for-loop would take less than 1ms to finish. Therefore, the memory pool would not adjust and items would not be evicted from the store. By doubling the amount of elements created in the for-loop, we give enough time for the first heartbeat to run and adjust the memory available (which will cause the evictions to happen).
2023-09-25 08:02:53 +00:00
Roman Gershman
e30c6ce41d
chore: Avoid allocating unique_members arrays (#1911)
* chore: Avoid allocating unique_members arrays when we have 1 or 2 members

* fix: pr fixes

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

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-09-25 10:50:06 +03:00
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