Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(set): fix random in SRANDMEMBER and SPOP commands #3022

Merged
merged 1 commit into from
May 13, 2024

Conversation

BagritsevichStepan
Copy link
Contributor

fixes #3018

  1. For IntSet, the time complexity is O(n) (n - number of elements to return/remove). The space complexity is also O(n)
  2. For StrSet, the time complexity is O(m) (m - number of elements in set). The space complexity is O(n)


class NonUniquePicksGenerator : public PicksGenerator {
public:
NonUniquePicksGenerator(RandomPick max_range);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can add a comment for max_range is open or closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -284,19 +284,32 @@ void InterStrSet(const DbContext& db_context, const vector<SetType>& vec, String
}
}

StringVec PopStrSet(const DbContext& db_context, unsigned count, const SetType& st) {
StringVec RandMemberStrSet(const DbContext& db_context, const SetType& st,
const std::unique_ptr<PicksGenerator>& generator,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would a virtual function making it even slower?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You can pass just const PicksGenerator&
  2. I don't think the virtual function call adds any mesurable latency 🙂

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @dranikpg, keep the virtual function call as it was

Copy link
Contributor

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry if this was not ready for review, just strolling by 👣

std::copy(result.begin(), result.end(), mapped.begin() + 1);
RecordJournal(op_args, "SREM"sv, mapped);
}
StringVec rand_members = rand_members_result.value();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a copy 👮🏻

Comment on lines 884 to 946
ArgSlice span{members_to_remove.data(), members_to_remove.size()};

auto rem_members_result = OpRem(op_args, key, span, false);
if (!rem_members_result) {
return rem_members_result.status();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RETURN_ON_BAD_STATUS(op_args, key, absl::MakeSpan(members), false) 😅

Comment on lines 1064 to 1124
int count = 1;
if (args.size() > 1) {
string_view arg = ArgS(args, 1);
if (!absl::SimpleAtoi(arg, &count)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changes what overload of SimpleAtoi is selected

Comment on lines +34 to +36
auto ConsistsOf(std::initializer_list<std::string> elements) {
return ConsistsOfMatcher(std::unordered_set<std::string>{elements});
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤩

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain what this means 😀

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means хороший код

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

хороший кот

Comment on lines 847 to 850
std::unique_ptr<PicksGenerator> generator =
picks_are_unique ? static_cast<std::unique_ptr<PicksGenerator>>(
std::make_unique<UniquePicksGenerator>(picks_count, size))
: std::make_unique<NonUniquePicksGenerator>(size);
Copy link
Contributor

@dranikpg dranikpg May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok mabye the function thing was more readable 😆 You can always also just use a declaration and an if after

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll fix it in zset_family.cc too

@@ -284,19 +284,32 @@ void InterStrSet(const DbContext& db_context, const vector<SetType>& vec, String
}
}

StringVec PopStrSet(const DbContext& db_context, unsigned count, const SetType& st) {
StringVec RandMemberStrSet(const DbContext& db_context, const SetType& st,
const std::unique_ptr<PicksGenerator>& generator,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. You can pass just const PicksGenerator&
  2. I don't think the virtual function call adds any mesurable latency 🙂

Comment on lines 301 to 310
std::uint32_t ss_entry_index = 0;
for (const sds ptr : *ss) {
std::uint32_t t = times_index_is_picked[ss_entry_index++];
while (t--) {
result.emplace_back(ptr, sdslen(ptr));
}
Copy link
Contributor

@dranikpg dranikpg May 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you use an unordered_map, but during iteration you'll end up creating every cell up to N because of [ss_entry_index], so better use find()

}
}

/* Members in result are sorted by scores. So, it is necessary to shuffle them*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Scores? I think you just mean that equal elements are always succesive and we're limited by the string-set order

Comment on lines 862 to 919
int64_t value;
DCHECK_GT(intsetGet(is, picked_index, &value), std::uint8_t(0));

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DCHECK it's not called in release builds 🙂

fixes dragonflydb#3018

Signed-off-by: Stepan Bagritsevich <sbagritsevich@quantumbrains.com>
@BagritsevichStepan
Copy link
Contributor Author

BagritsevichStepan commented May 9, 2024

Fix a bug where replicas remove other elements during SPOP. Now all the tests are passed. @dranikpg , please take a look.

Copy link
Contributor

@dranikpg dranikpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻 (Please push separate commits in the future so it's easier to see changes)

@dranikpg dranikpg merged commit d3a5851 into dragonflydb:main May 13, 2024
7 checks passed
szinn pushed a commit to szinn/k8s-homelab that referenced this pull request Jun 5, 2024
…nfly ( v1.18.1 → v1.19.0 ) (#3784)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[docker.dragonflydb.io/dragonflydb/dragonfly](https://togithub.com/dragonflydb/dragonfly)
| minor | `v1.18.1` -> `v1.19.0` |

---

### Release Notes

<details>
<summary>dragonflydb/dragonfly
(docker.dragonflydb.io/dragonflydb/dragonfly)</summary>

###
[`v1.19.0`](https://togithub.com/dragonflydb/dragonfly/releases/tag/v1.19.0)

[Compare
Source](https://togithub.com/dragonflydb/dragonfly/compare/v1.18.1...v1.19.0)

##### Dragonfly v1.19.0

Some prominent changes include:

- SPOP and SRANDMEMBER return truly randomized results
([#&#8203;3022](https://togithub.com/dragonflydb/dragonfly/issues/3022))
- Fix memory blowup in some cases during replication
([#&#8203;3084](https://togithub.com/dragonflydb/dragonfly/issues/3084)
[#&#8203;3103](https://togithub.com/dragonflydb/dragonfly/issues/3103))
- Snapshotting works with data tiering
([#&#8203;3073](https://togithub.com/dragonflydb/dragonfly/issues/3073))
- Fix incompatibility issue of RDB snapshot with Redis 6.x
([#&#8203;3121](https://togithub.com/dragonflydb/dragonfly/issues/3121))
- Memory utilization improvements + better introspection of memory usage
via /metrics

##### What's Changed

- chore: update versions and remove caching code by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3030
- chore: fix macos tiering by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3032
- feat: support subrange expressions in jsonpathv2 by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3036
- fix: reduce delay when stop replica
[#&#8203;3020](https://togithub.com/dragonflydb/dragonfly/issues/3020)
by [@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3028
- fix(set): fix random in SRANDMEMBER and SPOP commands by
[@&#8203;BagritsevichStepan](https://togithub.com/BagritsevichStepan) in
[dragonflydb/dragonfly#3022
- chore: prevent updating gcc on macos by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3037
- chore: add half-range indices by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3041
- chore: update helio together with new mimalloc version by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3040
- fix: header for oom_errors_total by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3043
- chore: reset enable_direct_fd to avoid socket leakage in kernel by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3051
- chore: update deprecated actions by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3052
- chore: remove unneeded check-fails by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3054
- chore: Export replication memory stats by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3062
- <chore>!: Update grafana panel by
[@&#8203;MaoMaoCake](https://togithub.com/MaoMaoCake) in
[dragonflydb/dragonfly#3064
- chore: add replication memory stats to the dashboard by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3065
- chore: bpop prints by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3076
- fix(tiering): wait for IO before test teardown by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3079
- chore: small replayer fixes by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3081
- fix: increase lua stack limit to 8KB by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3080
- chore: minor fixes by [@&#8203;romange](https://togithub.com/romange)
in
[dragonflydb/dragonfly#3082
- fix: fix cluster incorrect keys status by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3083
- fix(acl): return -NOPERM instead of response error by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3049
- feat(server): Expose serialization bytes via `INFO` and `/metrics` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3087
- chore(streams): Some refactoring by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3088
- feat(server): remove multi shard sync from replication by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3085
- fix(replication): fullsync phase write to sync on noop by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3084
- fix(tiering): Async delete for small bins by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3068
- fix: prevent crashing if error happened during snapshot moving by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3092
- fix: add timeout for DFLYMIGRATE ACK to prevent deadlock by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3093
- chore: improve Migration() by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3033
- feat(streams): Stream optimizations by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3091
- feat(tiering): Defragmentation by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3021
- fix: bit shift of kTagMask by
[@&#8203;haodongnj](https://togithub.com/haodongnj) in
[dragonflydb/dragonfly#3099
- feat(cluster_mgr): Allow attaching replicas by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3105
- bug(server): fix replication stuck in full sync by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3103
- fix(server): Sync FLUSH with tiering by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3098
- chore: export pipeline related metrics by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3104
- chore: zset error log (from 1.18 branch) by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3109
- New test for cluster migration: connection issue by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3102
- chore: minor fixes + remove redundant DCHECK by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3115
- fix: fix cluster_fuzzy_migration test by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3116
- feat(server): Pipeline and dispatch on `/metrics` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3117
- chore: pull helio add test for tls deadlock by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3111
- feat(cluster_mgr): Improvements to `cluster_mgr.py` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3118
- refactor client tracking, fix atomicity, squashing and multi/exec by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#2970
- fix(server): fix compatibility with rdb snapshot by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3121
- Revert "refactor client tracking, fix atomicity, squashing and multi/…
by [@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3122
- feat(cluster_mgr): Take over command by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3120
- fix: fix RestoreStreamer to prevent buckets skipping
[#&#8203;2830](https://togithub.com/dragonflydb/dragonfly/issues/2830)
by [@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3119
- feat(cluster_mgr): Fix migration action by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3124
- chore: prevent Dispatch fiber to be launched during migration by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3123
- feat(tiering): Simple snapshotting by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3073
- fix: upload action in version release by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3127

##### New Contributors

- [@&#8203;MaoMaoCake](https://togithub.com/MaoMaoCake) made their first
contribution in
[dragonflydb/dragonfly#3064
- [@&#8203;haodongnj](https://togithub.com/haodongnj) made their first
contribution in
[dragonflydb/dragonfly#3099

##### Huge thanks to all the contributors! ❤️

**Full Changelog**:
dragonflydb/dragonfly@v1.18.0...v1.19.0

</details>

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjM5MS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Co-authored-by: repo-jeeves[bot] <106431701+repo-jeeves[bot]@users.noreply.github.com>
kireque pushed a commit to kireque/home-ops that referenced this pull request Jun 6, 2024
…nfly ( v1.18.1 → v1.19.0 ) (#629)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[docker.dragonflydb.io/dragonflydb/dragonfly](https://togithub.com/dragonflydb/dragonfly)
| minor | `v1.18.1` -> `v1.19.0` |

---

### Release Notes

<details>
<summary>dragonflydb/dragonfly
(docker.dragonflydb.io/dragonflydb/dragonfly)</summary>

###
[`v1.19.0`](https://togithub.com/dragonflydb/dragonfly/releases/tag/v1.19.0)

[Compare
Source](https://togithub.com/dragonflydb/dragonfly/compare/v1.18.1...v1.19.0)

##### Dragonfly v1.19.0

Some prominent changes include:

- SPOP and SRANDMEMBER return truly randomized results
([#&#8203;3022](https://togithub.com/dragonflydb/dragonfly/issues/3022))
- Fix memory blowup in some cases during replication
([#&#8203;3084](https://togithub.com/dragonflydb/dragonfly/issues/3084)
[#&#8203;3103](https://togithub.com/dragonflydb/dragonfly/issues/3103))
- Snapshotting works with data tiering
([#&#8203;3073](https://togithub.com/dragonflydb/dragonfly/issues/3073))
- Fix incompatibility issue of RDB snapshot with Redis 6.x
([#&#8203;3121](https://togithub.com/dragonflydb/dragonfly/issues/3121))
- Memory utilization improvements + better introspection of memory usage
via /metrics

##### What's Changed

- chore: update versions and remove caching code by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3030
- chore: fix macos tiering by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3032
- feat: support subrange expressions in jsonpathv2 by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3036
- fix: reduce delay when stop replica
[#&#8203;3020](https://togithub.com/dragonflydb/dragonfly/issues/3020)
by [@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3028
- fix(set): fix random in SRANDMEMBER and SPOP commands by
[@&#8203;BagritsevichStepan](https://togithub.com/BagritsevichStepan) in
[dragonflydb/dragonfly#3022
- chore: prevent updating gcc on macos by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3037
- chore: add half-range indices by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3041
- chore: update helio together with new mimalloc version by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3040
- fix: header for oom_errors_total by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3043
- chore: reset enable_direct_fd to avoid socket leakage in kernel by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3051
- chore: update deprecated actions by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3052
- chore: remove unneeded check-fails by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3054
- chore: Export replication memory stats by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3062
- <chore>!: Update grafana panel by
[@&#8203;MaoMaoCake](https://togithub.com/MaoMaoCake) in
[dragonflydb/dragonfly#3064
- chore: add replication memory stats to the dashboard by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3065
- chore: bpop prints by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3076
- fix(tiering): wait for IO before test teardown by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3079
- chore: small replayer fixes by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3081
- fix: increase lua stack limit to 8KB by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3080
- chore: minor fixes by [@&#8203;romange](https://togithub.com/romange)
in
[dragonflydb/dragonfly#3082
- fix: fix cluster incorrect keys status by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3083
- fix(acl): return -NOPERM instead of response error by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3049
- feat(server): Expose serialization bytes via `INFO` and `/metrics` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3087
- chore(streams): Some refactoring by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3088
- feat(server): remove multi shard sync from replication by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3085
- fix(replication): fullsync phase write to sync on noop by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3084
- fix(tiering): Async delete for small bins by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3068
- fix: prevent crashing if error happened during snapshot moving by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3092
- fix: add timeout for DFLYMIGRATE ACK to prevent deadlock by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3093
- chore: improve Migration() by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3033
- feat(streams): Stream optimizations by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3091
- feat(tiering): Defragmentation by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3021
- fix: bit shift of kTagMask by
[@&#8203;haodongnj](https://togithub.com/haodongnj) in
[dragonflydb/dragonfly#3099
- feat(cluster_mgr): Allow attaching replicas by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3105
- bug(server): fix replication stuck in full sync by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3103
- fix(server): Sync FLUSH with tiering by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3098
- chore: export pipeline related metrics by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3104
- chore: zset error log (from 1.18 branch) by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3109
- New test for cluster migration: connection issue by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3102
- chore: minor fixes + remove redundant DCHECK by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3115
- fix: fix cluster_fuzzy_migration test by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3116
- feat(server): Pipeline and dispatch on `/metrics` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3117
- chore: pull helio add test for tls deadlock by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3111
- feat(cluster_mgr): Improvements to `cluster_mgr.py` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3118
- refactor client tracking, fix atomicity, squashing and multi/exec by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#2970
- fix(server): fix compatibility with rdb snapshot by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3121
- Revert "refactor client tracking, fix atomicity, squashing and multi/…
by [@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3122
- feat(cluster_mgr): Take over command by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3120
- fix: fix RestoreStreamer to prevent buckets skipping
[#&#8203;2830](https://togithub.com/dragonflydb/dragonfly/issues/2830)
by [@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3119
- feat(cluster_mgr): Fix migration action by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3124
- chore: prevent Dispatch fiber to be launched during migration by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3123
- feat(tiering): Simple snapshotting by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3073
- fix: upload action in version release by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3127

##### New Contributors

- [@&#8203;MaoMaoCake](https://togithub.com/MaoMaoCake) made their first
contribution in
[dragonflydb/dragonfly#3064
- [@&#8203;haodongnj](https://togithub.com/haodongnj) made their first
contribution in
[dragonflydb/dragonfly#3099

##### Huge thanks to all the contributors! ❤️

**Full Changelog**:
dragonflydb/dragonfly@v1.18.0...v1.19.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM5MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
lumiere-bot bot added a commit to coolguy1771/home-ops that referenced this pull request Jun 7, 2024
…19.0 ) (#4821)

This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
|
[ghcr.io/dragonflydb/dragonfly](https://togithub.com/dragonflydb/dragonfly)
| minor | `v1.18.1` -> `v1.19.0` |

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>dragonflydb/dragonfly (ghcr.io/dragonflydb/dragonfly)</summary>

###
[`v1.19.0`](https://togithub.com/dragonflydb/dragonfly/releases/tag/v1.19.0)

[Compare
Source](https://togithub.com/dragonflydb/dragonfly/compare/v1.18.1...v1.19.0)

##### Dragonfly v1.19.0

Some prominent changes include:

- SPOP and SRANDMEMBER return truly randomized results
([#&#8203;3022](https://togithub.com/dragonflydb/dragonfly/issues/3022))
- Fix memory blowup in some cases during replication
([#&#8203;3084](https://togithub.com/dragonflydb/dragonfly/issues/3084)
[#&#8203;3103](https://togithub.com/dragonflydb/dragonfly/issues/3103))
- Snapshotting works with data tiering
([#&#8203;3073](https://togithub.com/dragonflydb/dragonfly/issues/3073))
- Fix incompatibility issue of RDB snapshot with Redis 6.x
([#&#8203;3121](https://togithub.com/dragonflydb/dragonfly/issues/3121))
- Memory utilization improvements + better introspection of memory usage
via /metrics

##### What's Changed

- chore: update versions and remove caching code by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3030
- chore: fix macos tiering by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3032
- feat: support subrange expressions in jsonpathv2 by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3036
- fix: reduce delay when stop replica
[#&#8203;3020](https://togithub.com/dragonflydb/dragonfly/issues/3020)
by [@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3028
- fix(set): fix random in SRANDMEMBER and SPOP commands by
[@&#8203;BagritsevichStepan](https://togithub.com/BagritsevichStepan) in
[dragonflydb/dragonfly#3022
- chore: prevent updating gcc on macos by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3037
- chore: add half-range indices by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3041
- chore: update helio together with new mimalloc version by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3040
- fix: header for oom_errors_total by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3043
- chore: reset enable_direct_fd to avoid socket leakage in kernel by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3051
- chore: update deprecated actions by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3052
- chore: remove unneeded check-fails by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3054
- chore: Export replication memory stats by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3062
- <chore>!: Update grafana panel by
[@&#8203;MaoMaoCake](https://togithub.com/MaoMaoCake) in
[dragonflydb/dragonfly#3064
- chore: add replication memory stats to the dashboard by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3065
- chore: bpop prints by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3076
- fix(tiering): wait for IO before test teardown by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3079
- chore: small replayer fixes by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3081
- fix: increase lua stack limit to 8KB by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3080
- chore: minor fixes by [@&#8203;romange](https://togithub.com/romange)
in
[dragonflydb/dragonfly#3082
- fix: fix cluster incorrect keys status by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3083
- fix(acl): return -NOPERM instead of response error by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3049
- feat(server): Expose serialization bytes via `INFO` and `/metrics` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3087
- chore(streams): Some refactoring by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3088
- feat(server): remove multi shard sync from replication by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3085
- fix(replication): fullsync phase write to sync on noop by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3084
- fix(tiering): Async delete for small bins by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3068
- fix: prevent crashing if error happened during snapshot moving by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3092
- fix: add timeout for DFLYMIGRATE ACK to prevent deadlock by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3093
- chore: improve Migration() by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3033
- feat(streams): Stream optimizations by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3091
- feat(tiering): Defragmentation by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3021
- fix: bit shift of kTagMask by
[@&#8203;haodongnj](https://togithub.com/haodongnj) in
[dragonflydb/dragonfly#3099
- feat(cluster_mgr): Allow attaching replicas by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3105
- bug(server): fix replication stuck in full sync by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3103
- fix(server): Sync FLUSH with tiering by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3098
- chore: export pipeline related metrics by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3104
- chore: zset error log (from 1.18 branch) by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3109
- New test for cluster migration: connection issue by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3102
- chore: minor fixes + remove redundant DCHECK by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3115
- fix: fix cluster_fuzzy_migration test by
[@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3116
- feat(server): Pipeline and dispatch on `/metrics` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3117
- chore: pull helio add test for tls deadlock by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#3111
- feat(cluster_mgr): Improvements to `cluster_mgr.py` by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3118
- refactor client tracking, fix atomicity, squashing and multi/exec by
[@&#8203;kostasrim](https://togithub.com/kostasrim) in
[dragonflydb/dragonfly#2970
- fix(server): fix compatibility with rdb snapshot by
[@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3121
- Revert "refactor client tracking, fix atomicity, squashing and multi/…
by [@&#8203;adiholden](https://togithub.com/adiholden) in
[dragonflydb/dragonfly#3122
- feat(cluster_mgr): Take over command by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3120
- fix: fix RestoreStreamer to prevent buckets skipping
[#&#8203;2830](https://togithub.com/dragonflydb/dragonfly/issues/2830)
by [@&#8203;BorysTheDev](https://togithub.com/BorysTheDev) in
[dragonflydb/dragonfly#3119
- feat(cluster_mgr): Fix migration action by
[@&#8203;chakaz](https://togithub.com/chakaz) in
[dragonflydb/dragonfly#3124
- chore: prevent Dispatch fiber to be launched during migration by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3123
- feat(tiering): Simple snapshotting by
[@&#8203;dranikpg](https://togithub.com/dranikpg) in
[dragonflydb/dragonfly#3073
- fix: upload action in version release by
[@&#8203;romange](https://togithub.com/romange) in
[dragonflydb/dragonfly#3127

##### New Contributors

- [@&#8203;MaoMaoCake](https://togithub.com/MaoMaoCake) made their first
contribution in
[dragonflydb/dragonfly#3064
- [@&#8203;haodongnj](https://togithub.com/haodongnj) made their first
contribution in
[dragonflydb/dragonfly#3099

##### Huge thanks to all the contributors! ❤️

**Full Changelog**:
dragonflydb/dragonfly@v1.18.0...v1.19.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about these
updates again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://togithub.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zOTAuMSIsInVwZGF0ZWRJblZlciI6IjM3LjM5MC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9jb250YWluZXIiLCJ0eXBlL21pbm9yIl19-->

Co-authored-by: lumiere-bot[bot] <98047013+lumiere-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SRANDMEMBER and SPOP always returns/removes only the lowest scoring element(s)
4 participants