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: add more check in cluster node parsing #2538

Merged
merged 14 commits into from
Sep 22, 2024

Conversation

jonathanc-n
Copy link
Contributor

references #2401

Added non confusing message when multiple nodes are added without a newline separator

Copy link
Member

@PragmaTwice PragmaTwice left a comment

Choose a reason for hiding this comment

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

Could you add a test case for this patch?

@jonathanc-n
Copy link
Contributor Author

Test case is added + the node checking is more flexible

@jonathanc-n
Copy link
Contributor Author

@PragmaTwice Are you able to see what exactly is causing the fail on the error, I don't seem to be able to see the reason for it.

@git-hulk
Copy link
Member

@jonathanc-n #2401 is caused by missing a newline between nodes, and omitting the newline at the end should be allowed.

@jonathanc-n
Copy link
Contributor Author

@git-hulk Alright, it should be fully working now.

@git-hulk
Copy link
Member

@jonathanc-n You can enhance this inside parseClusterNodes

@jonathanc-n
Copy link
Contributor Author

@PragmaTwice @git-hulk This should be good I believe, I moved the changes to cluster.cc.

@git-hulk
Copy link
Member

git-hulk commented Sep 18, 2024

@jonathanc-n It would be better to check if the field is node id in line 778?

if (ranges.size() == 1) {

The current solution is too tricky from my perspective.

@jonathanc-n
Copy link
Contributor Author

@git-hulk I simplified as much as I thought I could for the issue to not persist. I believe it should be fine.

@jonathanc-n
Copy link
Contributor Author

@git-hulk @PragmaTwice Pretty sure this should be good, it passed the workflow. Unless you see some changes that should be made.

src/cluster/cluster.cc Outdated Show resolved Hide resolved
src/cluster/cluster.cc Outdated Show resolved Hide resolved
jonathanc-n and others added 2 commits September 21, 2024 03:13
Co-authored-by: hulk <hulk.website@gmail.com>
@jonathanc-n
Copy link
Contributor Author

@git-hulk Alright, should be fine now, sorry about that.

@git-hulk
Copy link
Member

@jonathanc-n No worry, thanks for your great contribution.

Copy link

sonarcloud bot commented Sep 21, 2024

@PragmaTwice PragmaTwice changed the title fix: Added new parsing check fix: add more check in cluster node parsing Sep 21, 2024
@git-hulk git-hulk merged commit f2bc224 into apache:unstable Sep 22, 2024
33 checks passed
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.

3 participants