2835 Commits

Author SHA1 Message Date
abf6d93c58 fix: crash during getting info about replication (#4328) v1.25.6 2024-12-18 09:54:01 +02:00
f4d3faaa26 fix: do not check-fail in OpRestore (#4332)
fix: do not check-fail OpRestore

In some rare cases we reach inconsistent state inside OpRestore where a key already exists, though it should not.
In that case log the error instead of crashing the server. In addition, we update the existing entry to the latest restored value.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-12-18 09:53:43 +02:00
ad3e037555 chore: pull helio
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
v1.25.5
2024-12-10 19:29:02 +02:00
965d94f761 fix(search_family): Fix crash when no SEPARATOR is specified in the FT.CREATE command (#4205)
fix(search_family): fix(search_family): Fix crash when no SEPARATOR is specified in the FT.CREATE command

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-10 14:07:11 +02:00
cd3ef9a436 fix: Do not attempt to defrag StringSet as a StringMap (#4283)
That'd be a total waste of time and energy, not to mention you'll crash.

Fixes #4167
2024-12-10 14:05:19 +02:00
c49dc61f51 fix(rax_tree): Fix crash caused by destructor in RaxTreeMap (#4228)
* fix(rax_tree): Fix double raxStop call in the SeekIterator

fixes dragonflydb#4172

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

* refactor(rax_tree): Address comments

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

---------

Signed-off-by: Stepan Bagritsevich <stefan@dragonflydb.io>
2024-12-10 14:02:24 +02:00
976586c966 fix cherry-pick confilic
Signed-off-by: adi_holden <adi@dragonflydb.io>
v1.25.4
2024-11-27 14:44:54 +02:00
d3690256f2 fix: Temporary fix for loading plain lists
**The Issue**

We do not serialize lists in PLAIN format well today. We're working on
getting it right, but existing wire format simply doesn't work.

**The (temporary) fix**

This PR attempts to load lists as usual, but upon failure it reverts to
loading a plain list format. This is not a perfect solution, and in some
extreme edge cases it could fail. But.. it's temporary.
2024-11-27 14:38:34 +02:00
e4208e99dd fix: stop using openssl for container healthchecks (#4181)
Dragonfly responds to ascii based requests to tls port with:
`-ERR Bad TLS header, double check if you enabled TLS for your client.`

Therefore, it is possible to test now both tls and non-tls ports with a plain-text PING.
Fixes #4171

Also, blacklist the bloom-filter test that Dragonfly does not support yet.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
v1.25.3
2024-11-25 18:21:34 +02:00
379557b3ac fix: deduplicate mget response (#4184)
In case of duplicate mget keys, skips fetching the same key twice.
The optimization is straighforward - we just copy the response for the original key,
since the response is a shallow object, we potentially save lots of memory with this
deduplication.

Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-25 18:20:18 +02:00
a3ebc37d9b fix(tools): Prevent dragonfly.logrotate to stop logrotate service (#4176)
Update dragonfly.logrotate

If multiple logs are being rotated and one of them fails (due to exit 1), the other logs that follow won't be rotated either, unless logrotate is run again.

If you want to prevent the rotation of a specific log file and not affect the rest of the logs, you'll want to handle the condition properly to ensure that logrotate doesn't abort due to the failure of the prerotate script.

To prevent the rotation of a specific log file without causing issues for other logs, you can use exit 0 to prevent rotation cleanly or design your prerotate script to handle conditions carefully.

Signed-off-by: s13k <s13k@pm.me>
2024-11-25 08:18:27 +02:00
0b4edec9c3 fix: remove DenseSet::IteratorBase::TraverseApply (#4170)
Signed-off-by: kostas <kostas@dragonflydb.io>
2024-11-24 16:13:09 +02:00
49c39f5a94 chore: Hide replicas from CLUSTER subcmds in managed mode (#4174)
* chore: Hide replicas from `CLUSTER` subcmds in managed mode

Part of #4173 (see for context)

* server.client()
2024-11-24 16:12:18 +02:00
8e4be532d9 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
v1.25.2
2024-11-20 20:20:52 +02:00
928896964d 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>
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-20 08:39:34 +02:00
1e31a675f7 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-20 08:33:06 +02:00
beffd61c6a chore: fix a potential crash during client list (#4141) 2024-11-20 08:32:17 +02:00
ea85354a31 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>
v1.25.1
2024-11-11 22:00:19 +02:00
a506795762 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>
v1.25.0
2024-11-10 16:57:44 +02:00
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
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
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
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
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
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
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
43060ba79e chore(dependabot): Allows only security patches (#4075)
* feat(dependabot): Add dependabot to check for vulnerabilies and update dependencies

---------

Signed-off-by: BLANKatGITHUB <131886247+BLANKatGITHUB@users.noreply.github.com>
Signed-off-by: Blanky <131886247+BLANKatGITHUB@users.noreply.github.com>
2024-11-08 08:08:33 +02:00
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
2794239827 chore: Add QList::Iterator (#4082)
Signed-off-by: Roman Gershman <roman@dragonflydb.io>
2024-11-07 20:51:09 +02:00
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
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
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
f8b3fa0d7b feat: support GCS storage for saving/loading snapshots (#4064) 2024-11-06 12:11:59 +02:00
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
7df8c268d8 chore: eliminate redundant ConnectionContext arguments (#4065) 2024-11-05 10:40:04 +02:00
54c67a9198 chore(deps): bump pytest-repeat from 0.9.1 to 0.9.3 in /tests/dragonfly (#4057)
Bumps [pytest-repeat](https://github.com/pytest-dev/pytest-repeat) from 0.9.1 to 0.9.3.
- [Release notes](https://github.com/pytest-dev/pytest-repeat/releases)
- [Changelog](https://github.com/pytest-dev/pytest-repeat/blob/main/CHANGES.rst)
- [Commits](https://github.com/pytest-dev/pytest-repeat/compare/v0.9.1...v0.9.3)

---
updated-dependencies:
- dependency-name: pytest-repeat
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 23:47:24 +02:00
aa4a61894d chore(deps): bump docker/build-push-action from 5 to 6 (#4055)
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:38:06 +02:00
d6ec5910d1 chore(deps): bump github/codeql-action from 3.24.9 to 3.27.0 (#4054)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.24.9 to 3.27.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](1b1aada464...662472033e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:37:51 +02:00
8dc12a39e5 chore(deps): bump ossf/scorecard-action from 2.3.1 to 2.4.0 (#4053)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.3.1 to 2.4.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](0864cf1902...62b2cac7ed)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:37:07 +02:00
f67103f9b0 chore(deps): bump mozilla-actions/sccache-action from 0.0.4 to 0.0.6 (#4051)
Bumps [mozilla-actions/sccache-action](https://github.com/mozilla-actions/sccache-action) from 0.0.4 to 0.0.6.
- [Release notes](https://github.com/mozilla-actions/sccache-action/releases)
- [Commits](https://github.com/mozilla-actions/sccache-action/compare/v0.0.4...v0.0.6)

---
updated-dependencies:
- dependency-name: mozilla-actions/sccache-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:36:20 +02:00
18f7d9bbd5 chore(deps): bump mikepenz/action-junit-report from 4 to 5 (#4052)
Bumps [mikepenz/action-junit-report](https://github.com/mikepenz/action-junit-report) from 4 to 5.
- [Release notes](https://github.com/mikepenz/action-junit-report/releases)
- [Commits](https://github.com/mikepenz/action-junit-report/compare/v4...v5)

---
updated-dependencies:
- dependency-name: mikepenz/action-junit-report
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:35:47 +02:00
94ee96afd0 chore(deps): bump redis-om from 0.2.2 to 0.3.3 in /tests/dragonfly (#4060)
Bumps [redis-om](https://github.com/redis/redis-om-python) from 0.2.2 to 0.3.3.
- [Release notes](https://github.com/redis/redis-om-python/releases)
- [Commits](https://github.com/redis/redis-om-python/compare/v0.2.2...v0.3.3)

---
updated-dependencies:
- dependency-name: redis-om
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:35:18 +02:00
eedb04509d chore(deps): bump github.com/gruntwork-io/terratest from 0.41.11 to 0.47.2 in /contrib/charts/dragonfly (#4058)
chore(deps): bump github.com/gruntwork-io/terratest

Bumps [github.com/gruntwork-io/terratest](https://github.com/gruntwork-io/terratest) from 0.41.11 to 0.47.2.
- [Release notes](https://github.com/gruntwork-io/terratest/releases)
- [Commits](https://github.com/gruntwork-io/terratest/compare/v0.41.11...v0.47.2)

---
updated-dependencies:
- dependency-name: github.com/gruntwork-io/terratest
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:34:48 +02:00
b70f9703f4 chore(deps): bump tomli from 2.0.1 to 2.0.2 in /tests/dragonfly (#4059)
Bumps [tomli](https://github.com/hukkin/tomli) from 2.0.1 to 2.0.2.
- [Changelog](https://github.com/hukkin/tomli/blob/master/CHANGELOG.md)
- [Commits](https://github.com/hukkin/tomli/compare/2.0.1...2.0.2)

---
updated-dependencies:
- dependency-name: tomli
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:31:29 +02:00
86b64d910a chore(deps): bump github.com/redis/go-redis/v9 from 9.5.1 to 9.7.0 in /tools/replay (#4062)
chore(deps): bump github.com/redis/go-redis/v9 in /tools/replay

Bumps [github.com/redis/go-redis/v9](https://github.com/redis/go-redis) from 9.5.1 to 9.7.0.
- [Release notes](https://github.com/redis/go-redis/releases)
- [Changelog](https://github.com/redis/go-redis/blob/master/CHANGELOG.md)
- [Commits](https://github.com/redis/go-redis/compare/v9.5.1...v9.7.0)

---
updated-dependencies:
- dependency-name: github.com/redis/go-redis/v9
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:31:01 +02:00
ceb474fbda chore(deps): bump numpy from 1.24.1 to 2.1.3 in /tools (#4063)
Bumps [numpy](https://github.com/numpy/numpy) from 1.24.1 to 2.1.3.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](https://github.com/numpy/numpy/compare/v1.24.1...v2.1.3)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-11-04 22:30:34 +02:00
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
fb7ea6c827 feat(dependabot): Add dependabot to check for vulnerabilies and updat… (#4035)
* feat(dependabot): Add dependabot to check for vulnerabilies and update dependencies

* feat(dependabot):  Adds dependabot to update dependencies automatically

Signed-off-by: BLANKatGITHUB <131886247+BLANKatGITHUB@users.noreply.github.com>

* feat(dependabot): adds support for dependabot

---------

Signed-off-by: BLANKatGITHUB <131886247+BLANKatGITHUB@users.noreply.github.com>
2024-11-04 19:19:04 +02:00
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
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