-
Notifications
You must be signed in to change notification settings - Fork 801
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
Adding protoversion as a config value #4252
Adding protoversion as a config value #4252
Conversation
@yycptt @longquanzheng I was having some weird issues when I was running Since this is a really big change I thought it might be a good idea if I first make all the changes without the config files (to see if it's working properly and passing all the test, my test fail in local because I dont have mysql). If everything looks correct, I would create a 2nd PR where I would add all the changes on the yaml, config and env files (if that's ok to you) |
I am fine with it. Thanks for the contribution. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM. Only a few minor comments.
@@ -35,6 +35,9 @@ const ( | |||
// CreateSession creates a new session | |||
// TODO this will be converted to private later, after all cassandra code moved to plugin pkg | |||
func CreateSession(cfg config.Cassandra) (gocql.Session, error) { | |||
if cfg.ProtoVersion == 0 { | |||
cfg.ProtoVersion = cassandraProtoVersion |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also here
@@ -23,18 +23,22 @@ package cassandra | |||
import ( | |||
"time" | |||
|
|||
"github.com/uber/cadence/environment" | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you remove this empty line?
…of github.com:noiarek/cadence into rodrigo.villarreal/add-cassandra-client-proto-version
What changed?
ProtoVersion can now be defined in development.yaml. If not present, the default value will be 4. This will be done in a 2 steps process:
Why?
Labeled as
Up for grabs
asgood first issue
in #3536How did you test it?
Playing with some values in the development.yaml file. Happy to add some unit test if you indicate me where
Potential risks
There was a default value set in
newCassandraCluster
, however the value is sent by value and not by reference so it won't be set somewhere else. Potentially the right place would betools/cassandra/handler.go
but please let me know where you think I should set this value in case this is not the right placeRelease notes
Maybe? Let me know if you want me to do that in the second step
Documentation Changes
Likely to be the case. Let me know if I need to do this in the second step