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

2147 commits

Author SHA1 Message Date
Roman Gershman
581cfbf6c5
chore: allow slow and precise memory measurement of an object (#4160)
Specifically fixes "MEMORY USAGE" for lists.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-21 09:21:48 +02:00
Shahar Mike
24a1ec6ab2
fix: Huge entries fail to load outside RDB / replication (#4154)
* fix: Huge entries fail to load outside RDB / replication

We have an internal utility tool that we use to deserialize values in
some use cases:

* `RESTORE`
* Cluster slot migration
* `RENAME`, if the source and target shards are different

We [recently](https://github.com/dragonflydb/dragonfly/issues/3760)
changed this area of the code, which caused this regression as it only
handled RDB / replication streams.

Fixes #4143
2024-11-20 14:00:07 +00:00
Roman Gershman
36135f516f
fix: test_replication_all failure (#4155)
Fixes #4150. The failure can be reproduced with high probability on ARM via
`pytest dragonfly/replication_test.py -k test_replication_all[df_factory0-mode0-8-t_replicas3-seeder_config3-2000-False]`

Not sure why this barrier is needed but #4146 removes the barrier
which breaks a gentle balance in the code in unexpected way.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-20 14:00:28 +02:00
Roman Gershman
0e7ae34fe4
fix: enforce load limits when loading snapshot (#4136)
* fix: enforce load limits when loading snapshot

Prevent loading snapshots with used memory higher than max memory limit.

1. Store the used memory metadata only inside the summary file
2. Load the summary file before loading anything else, and if the used-memory is higher,
   abort the load.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-20 06:12:47 +02:00
Borys
4e7800f94f
fix: UB during cmd squashing reply size calculation (#4149)
* fix: UB during cmd squashing reply size calculation

* feat: add promtheus metric commands_squashing_replies_bytes
2024-11-19 13:40:30 +02:00
Roman Gershman
794bd1cdb3
chore: tune logs and improve restrict denied error (#4145)
1. Now error stats show "restrict_denied" instead of "Cannot execute restricted command ..." error.
2. Increased verbosity level when loading a key with expired timestamp.
3. pulled helio with better logs coverage of tls_socket.cc code.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-18 23:14:14 +02:00
Roman Gershman
d467a348ac
fix: allow SELECT in multi/exec if it's a noop (#4146)
Fixes #4120

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-18 22:27:34 +02:00
Borys
e16ef838e4
feat: add INFO memory section for squashing replies memory consuming (#4147)
* feat: add INFO memory section for squashing replies memory consuming

* refactor: address comments
2024-11-18 21:16:41 +02:00
Borys
5e2b48c3f3
fix: migration ACK response processing (#4140) 2024-11-18 09:28:07 +02:00
Roman Gershman
ee01dc4fb5
chore: fix a potential crash during client list (#4141) 2024-11-18 06:32:30 +02:00
adiholden
59c81fb98a
fix server: fix write to slowlog on squashing flow (#4138)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-17 16:03:30 +02:00
Roman Gershman
8bd2b9ed3e
chore: optimize info command (#4137)
* chore: optimize info command

    Info command has a large latency when returning all the sections.
    But often a single section is required. Specifically,
    SERVER and REPLICATION sections are often fetched by clients
    or management components.

    This PR:
    1. Removes any hops for "INFO SERVER" command.
    2. Removes some redundant stats.
    3. Prints latency stats around GetMetrics command if it took to much.

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

* Update src/server/server_family.cc

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

* chore: remove GetMetrics dependency from the REPLICATION section

Also, address comments

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

* fix: clang build

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Signed-off-by: Roman Gershman <romange@gmail.com>
Co-authored-by: Shahar Mike <chakaz@users.noreply.github.com>
2024-11-17 13:33:29 +02:00
Roman Gershman
2ff6bf35c1
chore: improve the state machine of RedisParser (#4085)
1. Simplify conditions inside the main loop.
2. Improve the logic inside ConsumeBulk() function.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-15 11:14:50 +02:00
Roman Gershman
c46cb2514f
chore: fix plain node insertion (#4134)
The blob allocation had invalid size and the value has never been copied.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-14 23:53:34 +02:00
adiholden
db67b35f8e
fix server: fix stats of pipeline squashed commands (#4132)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-14 20:57:05 +02:00
Shahar Mike
1513134247
fix: Use MOVED error type for moved replies (#4125)
**The problem:**

When in cluster mode, `MOVED` replies (which are arguably not even errors) are aggregated per slot-id + remote host, and displayed in `# Errorstats` as such. For example, in a server that does _not_ own 8k slots, we will aggregate 8k different errors, and their counts (in memory).

This slows down all `INFO` replies, takes a lot of memory, and also makes `INFO` replies very long.

**The fix:**

Use `type` `MOVED` for moved replies, making them all the same under `# Errorstats`

Fixes #4118
2024-11-14 13:12:38 +02:00
Shahar Mike
f04e5497bc
fix: Do not use cc_ in connection if it's null (#4131)
* fix: Do not use `cc_` in connection if it's null

This is a rare condition, which we know can happen during shutdown (see
[here](https://github.com/dragonflydb/dragonfly/pull/3873#issue-2568503374))

* add comment
2024-11-14 12:41:51 +02:00
Roman Gershman
ab6088f5d6
chore: simplify BumpUps deduplication (#4098)
* chore: simplify BumpUps deduplication

This pr #2474 introduced iterator protection by
tracking which keys where bumped up during the transaction operation.
This was done by managing keys view set. However, this can be simplified
using fingerprints. Also, fingerprints do not require that the original keys exist.

In addition, this #3241 PR introduces FetchedItemsRestorer that tracks bumped set and
saves it to protect against fiber context switch. My claim is that it's redundant.
Since we only keep the auto-laundering iterators, when a fiber preempts these iterators recognize it
(see IteratorT::LaunderIfNeeded) and refresh themselves anyway.

To summarize: fetched_items_ protect us from iterator invalidation during atomic scenarios,
and auto-laundering protects us from everything else, so fetched_items_ can be cleared in that case.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-13 17:27:53 +02:00
adiholden
fb84d47b4d
feat server: experimental_new_io flag add as deprecated (#4127)
* feat server: experimental_new_io flag add as deprecated

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-13 13:29:40 +00:00
Roman Gershman
fa8f3f5564
fix: regression in squashing code when determining eval commands (#4116)
The regression was caused by #3947 and it causes crashes in bullmq.
It has not been found till now because python client sends commands in uppercase.
Fixes #4113

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Kostas Kyrimis <kostas@dragonflydb.io>
2024-11-11 19:54:47 +00:00
Kostas Kyrimis
0facd6fd8f
fix: skip Send() in SinkReplyBuilder::Flush() when vec is empty (#4114)
* skip Send() in SinkReplyBuilder::Flush() when vec is empty

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-11 17:53:30 +00:00
adiholden
3ab244616a
feat(server) : snapshot traverse physical buckets (#4084)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-11 14:49:20 +02:00
Roman Gershman
79aa5d490d
chore: support rdb loading and container utils with QList. (#4109)
generic_family_test and rdb_test pass with qlist enabled.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-11 12:13:10 +02:00
Roman Gershman
50473b56aa
chore: decouple reply_builder from ConnectionContext (#4069)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 21:14:24 +02:00
Roman Gershman
9b7af7d750
chore: implement Erase for a range (#4106)
chore: implement Erase with a range

Also migrate more unit tests from valkey repo.
Finally, fix OpTrim

All tests `list_family_test --list_experimental_v2` pass.

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

chore: implement OpTrim with QList
2024-11-10 16:33:34 +00:00
Stepan Bagritsevich
503bb4ed33
fix(search_family): Process wrong field types in indexes for the FT.SEARCH and FT.AGGREGATE commands (#4070)
* fix(search_family): Process wrong field types in indexes for the FT.SEARCH and FT.AGGREGATE commands

fixes  #3986
---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-11-10 16:56:25 +02:00
Roman Gershman
f745f3133d
chore: Implement LMOVE over QList (#4104)
* chore: Implement LMOVE over QList

All tests in list_family_test besides LTrim pass.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 13:47:01 +00:00
Roman Gershman
be96e6cf99
chore: change Namespaces to be a global pointer (#4032)
* chore: change Namespaces to be a global pointer

Before the namespaces object was defined globally.
However it has non-trivial d'tor that is being called after main exits.
It's quite dangerous to have global non-POD objects being defined globally.
For example, if we used LOG(INFO) inside the Clear function , that would crash dragonfly on exit.

Ths PR changes it to be a global pointer.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 10:45:53 +00:00
Roman Gershman
9366c67464
chore: Implement list Pop/Erase functionality with QList (#4099)
Adjusted OpRem/OpBPop/OpPop

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 12:37:42 +02:00
Roman Gershman
c43ba5f2cc
chore: RdbSerializer::SaveListObject supports QList (#4101)
Now, `./rdb_test --list_experimental_v2` passes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 12:35:24 +02:00
Vladislav
eadce55b67
chore: remove old io (#3953)
* chore: Remove old IO

* fix: fix last error accounting
* chore: use unique_ptr<char> in MGetResponse storage

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-11-10 11:56:41 +02:00
adiholden
2d49a28c15
fix(server): handle running script load inside multi (#4074)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-10 09:34:40 +02:00
Roman Gershman
75c961e7ed
chore: Add initial bindings for QList in list_family (#4093)
The feature is guarded by list_experimental_v2 flag, which is disabled.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-10 07:40:50 +02:00
Roman Gershman
1819e51f78
chore: implement QList::Erase functionality (#4092)
* chore: implement QList::Erase functionality

    Also add a parametrized test covering fill/compress options.
    Fix a compression bug introduced when copying the code.
    Introduce move c'tor/operator.

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

* chore: implement QList::Replace functionality

Also add a parametrized test covering fill/compress options.

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

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-09 20:06:32 +02:00
Kostas Kyrimis
d3ef0a3630
fix(sanitizers): disable false positive FtProfileInvalidQuery (#4090)
* disable FtProfileInvalidQuery 

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-08 18:46:54 +02:00
Roman Gershman
5838ed99b4
chore: implement QList::Insert function (#4087)
* chore: implement QList::Insert function

Also add a basic test for Insertion.
Prepare the skeleton for Replace functionality.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-08 11:33:37 +00:00
Vladislav
b860b712c0
chore(acl): Implicit categories (#3411)
Most of our CO:: categories became meaningless with the introduction of acl. For example, CO::FAST literally doesn't mean anything, it's never read or used.

* add implicit categories

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-11-08 12:40:56 +02:00
Roman Gershman
c9537bb52e
chore: implement QList::Iterate (#4086)
Also, copy the main flow for the Insert function.
It's not finished yet, hence no tests yet.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-08 11:19:54 +02:00
Roman Gershman
41d8df6e11
Add index based iterator to QList interface (#4083)
chore: add index based iterator to the interface

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-07 19:26:57 +00:00
Roman Gershman
2794239827
chore: Add QList::Iterator (#4082)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-07 20:51:09 +02:00
Roman Gershman
d5a0ce4004
chore: add push functionality to QList class (#4079)
The code is copied from quicklist.c
No functional changes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-07 12:14:42 +02:00
Roman Gershman
c75683277b
chore: add QList class (#4078)
This class will consolidate list functionality across multiple layers, and eventually replace the original quicklist code.
Right now we added the skeleton files and defined most of the interface.
The implementation is not done yet.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-07 11:13:12 +02:00
Roman Gershman
c19af2bd43
chore: parser clean ups (#4077)
1. Eliminate redundant states
2. Eliminate redundant member variables

Added some comments. No functional changes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-07 10:07:48 +02:00
Roman Gershman
f8b3fa0d7b
feat: support GCS storage for saving/loading snapshots (#4064) 2024-11-06 12:11:59 +02:00
adiholden
ae3faf59fb
feat(server): dont use channel for replication / save df (#4041)
* feat server: dont use channel for replication / save df

Signed-off-by: adi_holden <adi@dragonflydb.io>
2024-11-05 16:50:01 +02:00
Roman Gershman
7df8c268d8
chore: eliminate redundant ConnectionContext arguments (#4065) 2024-11-05 10:40:04 +02:00
Roman Gershman
8d61a91200
chore: pass reply_builder explicitly to pubsub module (#4021)
Also, deprecate `reply_builder()` access method.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-04 19:20:12 +02:00
Stepan Bagritsevich
7ac853567b
fix(search_family): Fix crash in FT.PROFILE command for invalid queries (#4043)
* refactor(search_family): Remove unnecessary std::move in FT.SEARCH

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* fix(search_family): Fix crash in FT.PROFILE command for invalid queries

fixes dragonflydb#3983

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

* refactor(search_family_test): address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-11-04 18:18:12 +01:00
Kostas Kyrimis
9c2fc3fe63
chore: add ForceUpdate to BPTree (#3993)
ReallocIfNeeded deleted and reinserted the same key in the BPTree stored in SortedMap. This is not really needed since the key is actually the same and we can just update the pointer within BPTree instead of doing the deletion + insertion chore.

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-04 15:53:13 +02:00
Kostas Kyrimis
4859077122
chore(DenseSet): defrag all links in a chain (#4019)
* add defrag for all nodes in a link chain
* add tests

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-04 08:34:22 +00:00
Roman Gershman
76b1f537b5
chore: refactor part of s3 logic for loading a snapshot. (#4044)
Is done as preparation to share some of its code with GCS implementation.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-04 10:13:53 +02:00
Kostas Kyrimis
e103254cf9
chore: add tx queue head debug info in AnalyzeTxQueue (#4026)
* add tx queue head debug info in AnalyzeTxQueue

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-04 09:41:18 +02:00
Borys
e4b468d953
fix: reduce memory consumption during migration (#4017)
* refactor: reduce memory consumption for RestoreStreamer
* fix: add Throttling into RestoreStreamer::WriteBucket
2024-11-03 17:03:45 +02:00
Borys
cd2ab4a585
chore: decrease logs severity for OOM from error to warning (#4031) 2024-11-01 11:12:28 +02:00
Roman Gershman
d10e76b408
chore: support load/save from GCS (#4006)
Not everything is supported but manual load save is supported.

1. Run dragonfly with `--dir gs://bucket/path`
2. In redis-cli:
   a. SET foo bar
   b. SAVE DF gsdump
   c. DFLY LOAD gs://bucket/path/gsdump-summary.dfs

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-30 13:57:58 +02:00
Kostas Kyrimis
daf8604175
chore: flush journal to channel for non auto journal commands (#3945)
* flush journal to channel for non auto journal commands
2024-10-30 12:09:01 +02:00
Roman Gershman
6f6897cef1
chore: pass RedisReplyBuilder explicitly from dragonfly connection (#4009)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-29 14:52:09 +02:00
Kostas Kyrimis
566f246cee
chore: skip AggregateWithLoadOptionHard on sanitizers (false positive) (#4013)
The test fails because of false positive so I disabled it.

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-29 14:26:50 +02:00
Roman Gershman
7737bb46f8
chore: improve verbosity logging during shutdown (#4010)
Increase verbosity levels of uring_proactor if deadlock was detected in debug mode.
Also allow optionally to disable periodic fiber, which sometimes helps during the debugging.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-29 13:45:57 +02:00
Kostas Kyrimis
4b495182e8
fix: separate Heartbeat and ShardHandler to fibers (#3936)
* separate shard_handler from Heartbeat
* add test

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-29 09:22:53 +02:00
Diskein
f16a32582e
feat(zset_family): support WITHSCORE in zrevrank/zrank commands (#3921) (#4001)
Signed-off-by: Diskein <kalantaevskii@gmail.com>
2024-10-29 04:44:27 +02:00
Roman Gershman
92be74f4e4
fix: build break in search_family (#4008)
Also perform additional clean-up of cntx->reply_builder() - Part11

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 17:40:27 +02:00
Roman Gershman
1bdd56c973
chore: pass SinkReplyBuilder and Transaction explicitly. Part10 (#3998) 2024-10-28 16:18:52 +02:00
Roman Gershman
b9c1aaec90
chore: introduce GcsSnapshotStorage (#4004)
It's not been used yet so no functional changes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 09:57:58 +00:00
Roman Gershman
c2710604de
chore: refactor snapshot expanding logic (#4003)
S3 and file expansion logic had some duplicate code.
this PR refactors it before adding GCS support.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 10:08:10 +02:00
Roman Gershman
db6504564d
chore: clean up conn_use_incoming_cpu heuristic (#3978)
Add a comment explaining when it can be useful.
It usually won't work without tuning the host first.
See https://docs.kernel.org/networking/scaling.html
for more details.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 09:54:44 +02:00
Roman Gershman
b0d52c69ba
feat: introduce metrics/logs of when pipelining is being throttled (#4000)
* feat: introduce metrics/logs of when pipelining is being throttled

Fixes #3999 following up on discussion at #3997.
---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-28 09:15:04 +02:00
Stepan Bagritsevich
5dcad859b0
fix(search_family): Fix indexes loading in the FT.SEARCH and Ft.AGGREGATE commands (#3955)
fixes dragonflydb#3782, dragonflydb#3659

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>
2024-10-27 21:14:02 +01:00
Roman Gershman
c895b96274
fix: keep the ttl bit when dense_set grows with expiring items (#3995)
Add a test that triggerred a corner case with assertion failure.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-25 22:29:54 +03:00
Roman Gershman
408a8a33f2
chore: pass SinkReplyBuilder and Transaction explicitly. Part9 (#3996) 2024-10-25 16:51:37 +03:00
Roman Gershman
ef09052482
chore: pass SinkReplyBuilder and Transaction explicitly. Part7 (#3988)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-25 13:32:51 +03:00
Roman Gershman
a2a5e3179a
chore: pass SinkReplyBuilder and Transaction explicitly. Part8 (#3992) 2024-10-25 13:32:28 +03:00
Vladislav
eb9b6890b0
feat(search): Prefix search for tags (#3972) 2024-10-25 08:47:27 +03:00
Borys
0a62f6b6ba
fix: prevent starting migrations from replica (#3985) 2024-10-25 08:41:26 +03:00
Kostas Kyrimis
79963f9a10
fix: replace string_view with string in RaxTreeMap::FindIterator (#3982)
* fixes dangling pointer caused by find()
* fixes memory leak in the destructor

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-24 23:49:24 +03:00
Roman Gershman
5ce3d82663
fix: properly set ttl bit during object replacement (#3991)
fixes #3984

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-24 23:47:37 +03:00
Roman Gershman
7035606b4b
chore: pass SinkReplyBuilder and Transaction explicitly. Part6 (#3987) 2024-10-24 18:47:18 +03:00
Roman Gershman
16f59d33f9
chore: pass SinkReplyBuilder and Transaction explicitly. Part5 (#3976)
This PR changes list_family.
zset_family has not been changed yet - the code is just moved to the anonymous namespace.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-24 17:16:43 +03:00
Kostas Kyrimis
b7160404ed
fix: dangling string in DebugCmd::Reload (#3981)
Assigning the result of absl::AsciiStrToUpper() to a string_view dangles

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-24 09:57:16 +00:00
Kostas Kyrimis
805f0203b9
fix(memory-leak): add missing destructor to RaxTreeMap (#3975)
The destructor of RaxTreeMap was missing causing memory leak.

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-24 12:45:11 +03:00
Roman Gershman
a4659c0843
fix: properly set object with DenseLinkKey (#3980)
The interface around DenseLinkKey is confusing but SetObject
works only for non-link objects.
Added assert to catch these issues in the future.

Fixes #3973

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-24 08:38:43 +00:00
Roman Gershman
132ffe0920
chore: reduce dependency of debug/memory commands on ConnectionContext (#3977)
chore: reduce dependency of debug/dfly/memory commands on ConnectionContext
2024-10-24 10:24:18 +03:00
Roman Gershman
4aa0ca1ef7
chore: get rid of MutableSlice (#3952)
* chore: get rid of MutableSlice

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

* chore: comments

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-23 21:50:39 +03:00
Roman Gershman
0ebc1a11e1
chore: pass SinkReplyBuilder and Transaction explicitly. Part4 (#3967) 2024-10-23 21:21:46 +03:00
Andy Dunstall
70614b8d40
fix(cluster): fix backoff on unknown migration (#3965) 2024-10-23 15:35:50 +01:00
Borys
c80d21fcba
fix: crash if we OOM during migration process (#3968) 2024-10-23 17:04:08 +03:00
Roman Gershman
bf42eb0330
chore: pass SinkReplyBuilder and Transaction explicitly. Part3 (#3966) 2024-10-23 11:10:01 +00:00
Roman Gershman
e24f697bb3
chore: pass SinkReplyBuilder and Transaction explicitly. Part2 (#3954)
This pr follows #3946

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-23 11:54:24 +03:00
Kostas Kyrimis
c5a8008348
chore: add defrag logic for zsets (#3836)
* add defrag logic for zsets
* add tests

---------

Signed-off-by: kostas <kostas@dragonflydb.io>
2024-10-23 10:56:56 +03:00
Stepan Bagritsevich
ea9dc9c454
chore(fakeredis): Enable JSON tests in the Fakeredis tests (#3773)
* chore(fakeredis): Enable JSON tests in the Fakeredis tests

fixes dragonflydb#3671

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* refactor: address comments

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* tmp commit

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

* refactor: address comments 2

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>

---------

Signed-off-by: Stsiapan Bahrytsevich <stefan@dragonflydb.io>
2024-10-23 08:53:14 +02:00
Stepan Bagritsevich
e96a99a868
fix(search_family): Temporary remove the error when a field name does not have the '@' sign at the beginning in the FT.AGGREGATE command (#3956) 2024-10-21 18:35:23 +02:00
Roman Gershman
3028314701
chore: pass SinkReplyBuilder and Transaction explicitly. Part1 (#3946)
For some of our commands we need to inject another transaction and another SinkReplyBuilder.
This results into error-prone injections of temporary objects into ConnectionContext.
Most commands just need Transaction and SinkReplyBuilder, so lets pass them explicitly.
The final goal will be to remove Transaction and reply_builder fields from ConnectionContext.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-20 19:54:50 +03:00
Roman Gershman
f0c30a6d59
feat: track request sizes histograms (#3951)
This PR introduces "DEBUG RECVSIZE ENABLE|DISABLE|tid"
command that allows tracking of request sizes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-20 19:54:34 +03:00
Vladislav
32a31cf1d8
chore(facade): Fix bad new IO glue (#3940)
* chore(facade): Fix bad new IO glue

---------

Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-10-18 23:25:56 +03:00
Roman Gershman
14220a6a20
chore: get rid of ToUpper/ToLower mutations on arguments (#3950)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-18 23:23:59 +03:00
Roman Gershman
84e22aa658
chore: remove ToUpper calls in main_service (#3947)
* chore: remove ToUpper calls in main_service

Also, test for IsPaused() first to avoid doing more checks for common-case.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-18 14:04:47 +00:00
Roman Gershman
a7c9fde38e
chore: get rid of ToUpper call and use AsciiStrToUpper (#3944)
Also remove std:: in bitops family to reduce noise.
No functional changes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-18 12:47:40 +03:00
Roman Gershman
5ab32b97d9
chore(refactoring): header clean ups (#3943)
Move privately used header code to cc files. Remove redunandant includes.
No functional changes.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-10-18 12:47:26 +03:00
Borys
ef814f6670
chore: ignore applying the same cluster config twice (#3932) 2024-10-16 09:07:01 +03:00
Vladislav
7870f59466
chore(search): Fix deprecated functions (#3933)
Signed-off-by: Vladislav Oleshko <vlad@dragonflydb.io>
2024-10-15 22:50:22 +03:00