Commit graph

3313 commits

Author SHA1 Message Date
Roman Gershman
eb80d576d5
chore: Make snapshotting more responsive (#4910)
* chore: Make snapshotting more responsive

This should improve situation around #4787 -
maybe not solve it completely but improve it significantly.

On my tests when doing snapshotting under read traffic with master
(memtier_benchmark --ratio 0:1 -d 256  --test-time=400  --distinct-client-seed --key-maximum=2000000 -c 5 -t 2 --pipeline=3)
I got drop from 250K qps to 8K qps during the full sync phase.

With this PR, the throughput went up to 70-80K qps.

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2025-04-16 07:48:23 +03:00
adiholden
b86b692461
server(bug): fix json mget crash on invalid path (#4940)
* server: fix json mget crash on invalid path

---------

Signed-off-by: adi_holden <adi@dragonflydb.io>
2025-04-15 21:56:10 +03:00
Volodymyr Yavdoshenko
d21166211d
fix: ZRANGE with LIMIT parameters crash fixed (#4944)
fixed: https://github.com/dragonflydb/dragonfly/issues/4943
2025-04-15 20:42:26 +03:00
mkaruza
9505d21047
fix(connection): Close MONITOR connection if pipeline overflows (#4889)
Close MONITOR connection if we overflow pipeline limits. It can happen
that MONITOR connection dispatches messages slower than they are received
causing memory to go out of bounds (and can result in process crash).

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-15 08:26:48 +02:00
Borys
5fc585b272
fix: test_migration_timeout_on_sync (#4933) 2025-04-14 20:59:42 +03:00
Volodymyr Yavdoshenko
eeb27f3569
fix: prefix search with added synonyms fixed (#4930)
fixed: https://github.com/dragonflydb/dragonfly/issues/4923
2025-04-14 19:04:05 +03:00
Volodymyr Yavdoshenko
9263fc8e92
fix: Dropping stale connections updated (#4909)
fixed: https://github.com/dragonflydb/dragonfly/issues/4893
2025-04-14 17:28:32 +03:00
mkaruza
ea17fc9893
fix(set_family): Update object time during SET FIELDEXPIRE (#4903)
StringSet object doesn't update time when FIELDEXPIRE is called. It will
use base time when object is created. Update object time when we want to
expire field in SET object.

Fixes #4894

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-14 13:14:40 +02:00
Stepan Bagritsevich
39a00806c9
fix(stream_family): Fix memory tracking for the STREAMs. SECOND PR (#4781)
* fix(stream_family): Fix memory tracking for the STREAMs

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

* refactor: address comments

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

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2025-04-14 13:07:17 +02:00
Borys
0997e68ddd
chore: improve SlotRanges::Merge algorithm (#4921) 2025-04-11 11:28:27 +00:00
Borys
84704a0ad3
test: add logs for cluster_mgr_test.py (#4920) 2025-04-11 09:44:04 +00:00
Abhijat Malviya
268e658376
fix: Skip test_take_over_counters for epoll (#4919) 2025-04-11 12:10:56 +05:30
mkaruza
86fb97f8a1
chore: Cleanup DbSlice::CallChangeCallbacks (#4917)
Remove key argument in DbSlice::CallChangeCallbacks which is used only
for DVLOG(2) logging. DbSlice::OnCbFinishBlocking needs to call this
function but it doesn't have key name so it has to retrieve it from
iterator.

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-10 16:50:32 +02:00
mkaruza
3148f1b7a3
fix(pytest): Wait exception on instance start and stop (#4916)
Pytest test_exit_on_s3_snapshot_load_err can raise exception on start in
some test environments. Now wait for exception in instance start and
stop.

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-10 16:49:01 +02:00
Borys
150357d960
fix: cancel blocking command during migration finalization (#4904)
* fix: cancel blocking command during migration finalization
2025-04-10 14:38:00 +00:00
Borys
d57a581303
refactor: add ability to reinit incoming migration object (#4756) 2025-04-10 13:06:50 +03:00
Harshit Gupta
09882f4150
perf: Added benchmarks for different operations in String Set. (#4866) 2025-04-10 11:50:52 +03:00
Abhijat Malviya
8d44206d41
fix(hset): Fix size account discrepancy when setting TTL (#4913)
When setting TTL, the object is cloned. An extra 4 bytes is requested
during allocation. This can result in the object being allocated from a
larger page, eg moving from 16 byte page to 32 byte page. The page block
size is used to report object allocation size. Currently this change in
size is not reflected in the total memory usage of the dense set, so it
remains 16 bytes while the object allocated size is now 32 bytes.

If such an object is later replaced, we deduct the size of the object
from total memory usage of the set. Here we can run into an overflow,
because the size of the object is deducted from the tracked size of the
set, and the former is greater than the latter.

To avoid this, if during setting expiry time the new size is different
from old size, we update the set size.
2025-04-10 12:49:11 +05:30
mkaruza
287f066d12
fix(pytest): Remove invalid argument from pytest (#4912)
Remove invalid argument in test_exit_on_s3_snapshot_load_err pytest

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-09 16:46:58 +00:00
Volodymyr Yavdoshenko
b1f8c9bd23
fix: invalid master_last_io_seconds_ago metric during stable sync (#4892)
fixed: https://github.com/dragonflydb/dragonfly/issues/4884
2025-04-09 14:25:08 +00:00
mkaruza
a5819aa9ca
feat(server): Exit process if error is report during initial load snapshot (#4907)
Exit process if error is reported when we try to initially load snapshot from
cloud storage or local directory.

Fixes #4840

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-09 14:42:28 +02:00
Abhijat Malviya
89aa54d785
fix(rdb): Print tag as int in error (#4908)
When we fail to save empty pv, its tag should be printed as int rather
than the default behaviour of trying to print uint8_t as a char.
2025-04-09 15:48:12 +05:30
Kostas Kyrimis
7adb071f2a
fix: test_replica_snapshot_with_big_values_while_seeding (#4902)
* throttle the test to require less memory
* increase reg test timeout on the ci from 50 to 60 mins

Signed-off-by: kostas <kostas@dragonflydb.io>
2025-04-09 08:20:58 +00:00
Abhijat Malviya
c129834cbf
fix(hset_family): Ensure empty hash sets are removed (#4873)
When a search operation is performed on a hash set, expired fields are
removed as a side effect.

If at the end of such an operation the hash set becomes empty, its key
is removed from the database.

Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
2025-04-09 12:25:43 +05:30
Kostas Kyrimis
2d96a57edf
fix: take_over_counters (#4890)
* increase delay for takeover

Signed-off-by: kostas <kostas@dragonflydb.io>
2025-04-09 09:20:21 +03:00
Borys
addf0497bf
test: tune test_cluster_migration_while_seeding to reduce false/posit… (#4901)
test: tune test_cluster_migration_while_seeding to reduce false/positive cases
2025-04-08 10:51:56 +00:00
Abhijat Malviya
e0be16b22c
pytest: temporarily skip test while its failures are investigated (#4900)
Signed-off-by: Abhijat Malviya <abhijat@dragonflydb.io>
2025-04-08 15:09:18 +05:30
mkaruza
378bcda8a2
feat(server): Move bumpup logic out of FindInternal (#4877)
Bumpup logic is moved to OnCbFinish. Previously keys which are going to
be delete were also bumped up but with this change if key doesn't exists
on callback we will skip it.

Closes #4775

Signed-off-by: mkaruza <mario@dragonflydb.io>
2025-04-07 14:15:13 +02:00
Kostas Kyrimis
b9ff1be7d8
chore: test snapshot in replica while seeding master (#4867)
Signed-off-by: kostas <kostas@dragonflydb.io>
2025-04-07 10:15:25 +00:00
Borys
2729332a0f
fix: make pause all for migration finalization (#4897) 2025-04-07 12:53:29 +03:00
Volodymyr Yavdoshenko
3a0830150e
fix: update timeout for connection test (#4895)
fixed: https://github.com/dragonflydb/dragonfly/issues/4893
2025-04-07 12:49:50 +03:00
Kostas Kyrimis
751ce58645
fix: skip heartbeat if shard is under global lock (#4882)
We allowed running heartbeat during global transactions. For example, during replication and while transitioning from full to stable sync we unregister and register journal callbacks with a preemption inbetween. If under preemption heartbeat runs, then we loose those journal entries triggering an lsn check failure.

Signed-off-by: kostas <kostas@dragonflydb.io>
2025-04-07 08:19:05 +00:00
Kostas Kyrimis
fb7a1facc8
fix: lsn check failure (#4881)
* rename StaticSeeder to DebugPopulateSeeder to show intent
* add a DCHECK in debug populate that triggers if there is a registered replica that hasn't reached stable sync
* small cleanup

Signed-off-by: kostas <kostas@dragonflydb.io>
2025-04-07 07:48:01 +00:00
Volodymyr Yavdoshenko
3eb8417453
fix: docker release should be updated latest version using semantic version of latest tag (#4887)
fixed: https://github.com/dragonflydb/dragonfly/issues/4831
2025-04-06 14:01:39 +03:00
Roman Gershman
1bfc3455fe
feat: debug compression <type> (#4879)
* feat: debug compression <type>

Extend `debug compression` to support value types.
if no type is given, falls back to testing keys compressability.

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

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>

---------

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-04-05 11:01:59 +03:00
Borys
ea451e943a
fix: test_migration_rebalance_node (#4891) 2025-04-05 09:59:27 +03:00
Volodymyr Yavdoshenko
ca0cdf8c40
fix: '@text:prefix*' matching for fields. (#4868)
fixed: https://github.com/dragonflydb/dragonfly/issues/4691
2025-04-04 12:38:22 +03:00
Roman Gershman
5a2192dfdf
fix: local dashboard show rapid changes in QPS (#4886)
Helps investigating #4787

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2025-04-03 20:12:26 +03:00
Roman Gershman
460690855e
fix: add version id for dev container builds (#4878)
now it looks like this:
```
> docker run --rm ghcr.io/dragonflydb/dragonfly-dev:ubuntu-f767d82 --version
dragonfly f767d82-f767d82ce78ccbc90ddfb525f4ad4bd9aafcfbed
```

fixes #4830

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2025-04-02 20:21:19 +03:00
adiholden
f5a1b482aa
feat(server): add connections send timeout (#4874)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2025-04-02 18:18:34 +03:00
Volodymyr Yavdoshenko
be11fa02cd
feat: Support synonyms in queries. Add FT.SYNUPDATE, FT.SYNDUMP (#4837)
feat: Added FT.SYNUPDATE: https://redis.io/docs/latest/commands/ft.synupdate/
feat: Added FT.SYNDUMP: https://redis.io/docs/latest/commands/ft.syndump/
2025-04-01 14:55:24 +03:00
lichuang
28fa1783db
feat(server): SCAN command add ATTR options (#4766) 2025-04-01 14:07:37 +03:00
Stepan Bagritsevich
3829ca87d7
chore(search_family): Add logging for monostate queries (#4872)
Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2025-04-01 09:51:57 +00:00
Borys
a7a59b0d28
chore: turn on more logs for test_migration_timeout_on_sync (#4870) 2025-04-01 07:36:06 +00:00
Volodymyr Yavdoshenko
9a0b8f1dcb
fix: FT.SEARCH commas support for ranges (#4844)
fixed: #4832
2025-04-01 09:21:47 +03:00
Thomas Camlong
2ae6c398d4
chore: Remove version attribute from compose file (#4869)
- Removes the warning the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion

Signed-off-by: Thomas Camlong <thomas@ajnart.fr>
2025-04-01 06:05:58 +00:00
adiholden
0e08f22167
fix test: test_cluster_slot_ownership_changes (#4865)
Signed-off-by: adi_holden <adi@dragonflydb.io>
2025-03-31 17:51:07 +03:00
Stepan Bagritsevich
e5a0a97555
fix(server_family): Remove redundant logging in the CLIENT command (#4859)
refactor: address comments

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2025-03-31 16:50:10 +02:00
adiholden
ca4135ee12
fix(test): test_cluster_slot_ownership_changes (#4852)
fix test: test_cluster_slot_ownership_changes

Signed-off-by: adi_holden <adi@dragonflydb.io>
2025-03-31 08:41:49 +03:00
Borys
c799d9b2ce
fix: increase timeout for test_replication_timeout_on_full_sync (#4851) 2025-03-30 16:39:56 +00:00