Commit graph

1696 commits

Author SHA1 Message Date
Shahar Mike
4cce3b4a01
feat(server): Better reporting of per-type memory in /metrics (#2303) 2023-12-14 14:41:25 +02:00
Vladislav
e273f7a2b8
fix(server): handle no-key-transactional commands in multi/exec (#2279)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-12-12 19:34:02 +03:00
Vladislav
7ca07a498f
fix(server): Fix client pause and add test (#2298)
Fixes a bug in which we incorrectly determined paused dispatches, which led to not allowing multiple (overlapping) client pauses
2023-12-12 19:28:48 +03:00
Kostas Kyrimis
8640edad71
feat(acl): add acl keys to acl log command (#2274)
* add acl keys to acl log command
* add tests
2023-12-12 17:00:41 +02:00
Roman Gershman
d88b2422de
chore: eliminate most of clang++ warnings (#2288)
Not all of them but 90% is done.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-12-11 12:47:53 +02:00
adiholden
dc3bc9e92f
fix(tiering): fix tiering crash on setting expire (#2285)
fixes #2224
the bug: when updateing entry pre update will resets the PrimeValue if
this is an external entries leading to crash if we insert entries with expire
time.

the fix: reserve the expire mask in PrimeValue on pre update

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-12-11 10:29:12 +02:00
Shahar Mike
1ce3f983c9
WIP: Auto PostUpdate() (#2268)
* WIP: Auto `PostUpdate()`

* More `Find()` uses

* Final touches

* Fixes

* Fix bug and allow reassigning

* Rename to AutoUpdater

* Fix and add DCHECK

* Also check deletion count

* Use ccache instead of sccache

* Try to upgrade Helio

* off64_t

* off64_t

* Revert changes to CI
2023-12-11 10:07:53 +02:00
Roman Gershman
c183bf69aa
chore: update helio (#2286)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-12-11 09:31:54 +02:00
Roman Gershman
ff562897eb
fix: accept '-' character when parsing json fields (#2271)
Fixes #2265
Also switch to our own fork of jsoncons instead of using patches.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-12-10 09:32:52 +02:00
Yue Li
64bbfc7063
feat(server): Support CLIENT TRACKING subcommand (1/2) (#2277)
The client tracking state is set by CLIENT TRACKING subcommand as well
as upon client disconnection.

Track the keys of a readonly command by maintaining mapping that maps
keys to the sets of tracking clients.
2023-12-08 23:13:55 -08:00
Kostas Kyrimis
8323c82dc5
feat(acl): add acl keys to acl save/load (#2273)
* add acl keys to acl savel/load
* add tests
2023-12-08 16:08:33 +00:00
Kostas Kyrimis
2703d4635d
feat(acl): add validation for acl keys (#2272)
* add validation for acl keys
* add tests
2023-12-08 17:28:53 +02:00
Kostas Kyrimis
8126cf8252
feat(acl): add acl keys to acl list command (#2261)
* add acl keys to acl list
2023-12-08 15:32:15 +03:00
Kostas Kyrimis
87ec0a1d65
feat(acl): add acl keys to acl get command (#2260)
* add acl keys to acl get command
* add tests for acl keys parsing
2023-12-08 10:42:27 +00:00
Kostas Kyrimis
b642fb6901
feat(acl): add acl keys to acl setuser command (#2258)
* add parsing of ACL keys
* add ACL keys to acl setuser command
2023-12-08 09:53:22 +00:00
Shahar Mike
636507c356
feat(server): Return per-type memory breakdown from INFO and /metrics (#2262)
* feat(server): Return per-type memory breakdown from INFO and /metrics

* OBJ_TYPE_MAX

* Move AddTypeMemoryUsage, use it from TieredStorage

* Remove strval_memory_usage

* Remove redundant strval_bytes

---------

Signed-off-by: Shahar Mike <chakaz@users.noreply.github.com>
2023-12-07 21:37:09 +02:00
adiholden
be82c11428
fix(tiering): fix crash when item was deleted before offloaded (#2225)
* fix(teiring): fix crash when item was deleted before offloaded

The bug: On insert key is inserted to bin peinding entries, if this key
was deleted we would check fail on finding this item when tring to flush
bin entries.

The fix: On every insert to bin pending entries erase pending entreis
which were delted or expired

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-12-07 20:38:23 +02:00
Kostas Kyrimis
74cc58dc4c
feat(acl): add storage for acl keys (#2257)
* add storage for acl keys
2023-12-07 19:34:06 +02:00
Yue Li
f89b65ca87
feat(Server):support Verbatim strings resp type, using it for CLIENT LIST and INFO commands (#2264)
fixes #2242 #2253

Reference:
The definition of Redis verbatim strings: https://redis.io/docs/reference/protocol-spec/#verbatim-strings

"For example, the Redis command INFO outputs a report that includes newlines. When using RESP3, redis-cli displays it correctly because it is sent as a Verbatim String reply (with its three bytes being "txt"). When using RESP2, however, the redis-cli is hard-coded to look for the INFO command to ensure its correct display to the user."

---------

Signed-off-by: Yue Li <61070669+theyueli@users.noreply.github.com>
2023-12-06 21:07:25 -08:00
Yue Li
bf0f7ec234
bug(hset): make hrandfield reply match Redis (#2266)
fixes #2249
2023-12-06 11:20:02 -08:00
Roman Gershman
1037f446a2
chore: add a test demonstrating on how to pass a dash within json path (#2267) 2023-12-06 19:24:15 +02:00
Yue Li
2e914efb52
bug(server): remove CO::READONLY for QUIT command. (#2263)
remove readonly for QUIT command.
2023-12-06 18:23:35 +02:00
Vladislav
5f58b3aafa
fix(connection): Add WeakRef to replace pubsub wait token (#2227)
Add WeakRef to connection to allow tracking it

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-12-06 12:07:31 +03:00
Borys
33d0879416
refactor: conn_context and reply_builder refactoring (#2251)
* refactor: conn_context and reply_builder refactoring
2023-12-06 08:23:32 +02:00
romange
1900e499ba chore(helm-chart): update to v1.13.0 2023-12-05 15:22:54 +00:00
Shahar Mike
3957370485
fix(server): Call PostUpdate from LPUSH even for new keys (#2254) 2023-12-05 14:23:56 +02:00
Vladislav
11ef6623dc
feat: DispatchTracker to replace everything (#2179)
* feat: DispatchTracker

Use a DispatchTracker to track ongoing dispatches for commands that change global state

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-12-05 11:02:11 +03:00
Roman Gershman
f39eac5bca
chore: add benchmarks for a small cloud instance (#1264)
chore: add benchmarks showing single-threded performanc

In addition addressed some questions raised during HN discussions.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-12-04 17:57:57 +02:00
Borys
24b13434cf
feat: add slot-migration-status command (#2239)
* feat: add slot-migration-status command
2023-12-04 12:47:46 +02:00
Vladislav
f17bfaf0ff
fix(search): Small improvements (#2248) 2023-12-03 20:04:47 +03:00
Roman Gershman
26512fdba4
fix: remove string copy in SendMGetResponse (#2246)
fix: eliminate the redundant string copy in SendMGetResponse

Also, allow selectively create DflyInstance in pytests that is attached to
an existing dragonfly port, created outside of tests.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-12-03 18:14:19 +02:00
Shahar Mike
d45ded3b76
fix(server): Fix crash when using MEMORY STATS commands (#2240)
* fix(server): Fix crash when using MEMORY STATS commands

* Fix
2023-12-01 21:39:32 +02:00
Borys
a57c6dac1e
add new method to CmdArgParser (#2244)
* add new method to CmdArgParser

* refactor: rename method
2023-12-01 17:14:25 +02:00
Roman Gershman
2381316866
fix: assign threadlocal data structures during connection migration (#2237)
* fix: assign threadlocal data structures during connection migration

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

* fix: assign threadlocal data structures during connection migration

Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
2023-12-01 13:34:19 +02:00
Kostas Kyrimis
b53492ece7
feat(bitops_family): implement bitfield_ro command (#2222)
* add bitfield_ro command
* add parsing test
2023-12-01 10:49:47 +02:00
Roman Gershman
d495baba93
fix: wrong assert check in dash segment (#2238)
Fixes #2234

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-12-01 05:42:49 +02:00
adiholden
3acacf8f5f
fix(server): initialize replica acked lsn (#2236)
* fix(server): initialize replica acked lsn

Signed-off-by: adi_holden <adi@dragonflydb.io>
2023-11-30 22:16:55 +02:00
Kostas Kyrimis
18a2b52f4e
feat(bitops_family): implement bitfield command (#2221)
* implement bitfield command
* add tests
2023-11-30 18:05:50 +03:00
Shahar Mike
d15bcf8392
fix(server): Save element expirations for hash sets & sets (#2223)
* fix(server): Save element expirations for hash sets

* Add support for sets

* Fixes

* Fixes
2023-11-30 14:08:04 +02:00
Vladislav
fd3fcdcbb4
fix(server): Unwatch keys during connection close (#2231) 2023-11-30 11:56:59 +02:00
Borys
bfb1b3b624
Start slot migration (#2218)
* feat: add new command START-SLOT-MIGRATION
2023-11-29 13:38:13 +02:00
Vladislav
43431d1986
fix(test): Fix connection context access (#2228)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-28 17:05:13 +03:00
Roman Gershman
0c5bb7b894
fix: regression test failures (#2226)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-27 21:41:52 +02:00
Roman Gershman
b853b2ab00
fix: memcached VERSION is now parseable by php-memcached client (#2220)
The DF version is being unparseable by Memcached::getVersion() that expects n.n.n string.
Change the version to emulate the old memcached server.
The DF version can still be fetched via Memcached::getStats() function.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-27 20:54:00 +02:00
zixuan zhao
3f7e42b099
Add store test case for GeoRadiusByMember (#2210)
* Add store test case for GeoRadiusByMember;Parsing code for STORE and STOREDIST

---------

Signed-off-by: azuredream <zhaozixuan67@gmail.com>
2023-11-27 13:01:22 +02:00
Roman Gershman
92614477b7
fix: fix cmd latency units in /metrics (#2217)
Also,
1. rebase helio dependency
2. get rid of varz counters that are superseded by
   commands_total/commands_duration_seconds_total metrics

Resolves #2213

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-27 11:44:16 +02:00
Shahar Mike
d6292ba6fd
feat(server): Better connection memory tracking (#2205) 2023-11-26 14:51:52 +02:00
Vladislav
d6044edbab
fix(squashing): Reset base command id (#2209)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-26 12:40:37 +02:00
Vladislav
cc6210d077
fix(search): Fix score alias for knn wrapped in sort (#2215)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2023-11-25 16:11:59 +03:00
Roman Gershman
7d53d196aa
chore: improve performance of mget operation (#2212)
Specifically, allocate only a single blob when returning multiple entries from a shard.
In addition, refactor and unify MGetResponse between string family code and ReplyBuilder code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2023-11-24 14:13:07 +02:00