You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kvrocks.apache.org by "git-hulk (via GitHub)" <gi...@apache.org> on 2025/01/05 12:07:01 UTC

[PR] Fix nil pointer when cloning the cluster [kvrocks-controller]

git-hulk opened a new pull request, #242:
URL: https://github.com/apache/kvrocks-controller/pull/242

   This closes #239 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix nil pointer when cloning the cluster [kvrocks-controller]

Posted by "git-hulk (via GitHub)" <gi...@apache.org>.
git-hulk commented on code in PR #242:
URL: https://github.com/apache/kvrocks-controller/pull/242#discussion_r1903281375


##########
store/cluster.go:
##########
@@ -78,6 +78,10 @@ func NewCluster(name string, nodes []string, replicas int) (*Cluster, error) {
 }
 
 func (cluster *Cluster) Clone() *Cluster {
+	if cluster == nil {

Review Comment:
   Yes, it will be better to keep consistent with other methods. Done.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix nil pointer when cloning the cluster [kvrocks-controller]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice commented on code in PR #242:
URL: https://github.com/apache/kvrocks-controller/pull/242#discussion_r1903280111


##########
store/cluster.go:
##########
@@ -78,6 +78,10 @@ func NewCluster(name string, nodes []string, replicas int) (*Cluster, error) {
 }
 
 func (cluster *Cluster) Clone() *Cluster {
+	if cluster == nil {

Review Comment:
   I prefer to check before any method call, e.g. `if c != nil { c.Clone() }`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] Fix nil pointer when cloning the cluster [kvrocks-controller]

Posted by "PragmaTwice (via GitHub)" <gi...@apache.org>.
PragmaTwice merged PR #242:
URL: https://github.com/apache/kvrocks-controller/pull/242


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@kvrocks.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org