Skip to content

Add support of the CLUSTER RESET command#2210

Merged
git-hulk merged 8 commits intoapache:unstablefrom
git-hulk:feature/cluster-reset
Apr 1, 2024
Merged

Add support of the CLUSTER RESET command#2210
git-hulk merged 8 commits intoapache:unstablefrom
git-hulk:feature/cluster-reset

Conversation

@git-hulk
Copy link
Copy Markdown
Member

@git-hulk git-hulk commented Mar 30, 2024

This closes #2185

@git-hulk git-hulk marked this pull request as ready for review March 31, 2024 04:38
@git-hulk git-hulk marked this pull request as draft March 31, 2024 05:08
@git-hulk git-hulk marked this pull request as ready for review March 31, 2024 06:58
@git-hulk git-hulk requested a review from caipengbo March 31, 2024 08:47
@sonarqubecloud
Copy link
Copy Markdown

Comment on lines +849 to +851
for (auto &n : slots_nodes_) {
n = nullptr;
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why we need to set all elements to nullptr instead of clear()?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

slot_nodes_ is an array and the number of slot is a fixed number, so I think it should be fine to clear them with the null pointer.

@git-hulk git-hulk merged commit 5c8b6cb into apache:unstable Apr 1, 2024
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.

Add support of the command CLUSTER RESET

5 participants