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

Adding Cassandra client proto version as config option #4188

Conversation

iamrodrigo
Copy link
Contributor

@iamrodrigo iamrodrigo commented May 10, 2021

What changed?
ProtoVersion can now be defined in development.yaml. If not present, the default value will be 4.

Why?
Labeled as Up for grabs as good first issue in #3536

How 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 be tools/cassandra/handler.go but please let me know where you think I should set this value in case this is not the right place

Release notes
Maybe? Let me know if you want me to do that

Documentation Changes
Likely to be the case. Let me know if I need to do this.

@yux0 yux0 requested review from vytautas-karpavicius and a team May 10, 2021 19:41
@coveralls
Copy link

coveralls commented May 10, 2021

Pull Request Test Coverage Report for Build 59ee0c23-3cf3-419a-827b-55640ee1a407

  • 21 of 22 (95.45%) changed or added relevant lines in 6 files are covered.
  • 35 unchanged lines in 6 files lost coverage.
  • Overall coverage increased (+0.06%) to 59.923%

Changes Missing Coverage Covered Lines Changed/Added Lines %
tools/cli/adminCommands.go 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
common/membership/rpServiceResolver.go 2 73.58%
common/task/fifoTaskScheduler.go 2 85.57%
service/history/queue/transfer_queue_processor.go 2 57.37%
common/persistence/cassandra/cassandraPersistence.go 3 52.8%
service/history/queue/timer_queue_processor_base.go 4 78.6%
common/persistence/cassandra/cassandraPersistenceUtil.go 22 91.38%
Totals Coverage Status
Change from base Build a9fc828d-3580-4c45-99b8-6ba6660226b6: 0.06%
Covered Lines: 88192
Relevant Lines: 147175

💛 - Coveralls

@iamrodrigo
Copy link
Contributor Author

Hi @vytautas-karpavicius, friendly ping to review this :)

Copy link
Contributor

@vytautas-karpavicius vytautas-karpavicius left a comment

Choose a reason for hiding this comment

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

Looks good.

tools/cassandra/cqlclient.go Show resolved Hide resolved
config/development.yaml Show resolved Hide resolved
@yycptt yycptt requested a review from longquanzheng May 19, 2021 00:47
@longquanzheng longquanzheng changed the title Rodrigo.villarreal/adding proto version as config var Adding Cassandra client proto version as config option May 19, 2021
@iamrodrigo iamrodrigo changed the base branch from master to 0.8.6 May 24, 2021 03:52
@iamrodrigo iamrodrigo changed the base branch from 0.8.6 to master May 24, 2021 03:52
…of github.com:noiarek/cadence into rodrigo.villarreal/adding-proto-version-as-config-var
Copy link
Contributor Author

@iamrodrigo iamrodrigo left a comment

Choose a reason for hiding this comment

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

@yycptt I've addressed your comments and also modified other files where Protoversion might be needed.

Two things to add:

  1. I don't know if this is related to my change but I'm getting an error when I run make bins. This is not allowing me to run the test in local
common/types/mapper/thrift/shared.go:3415:3: unknown field 'NextEventId' in struct literal of type shared.PollForDecisionTaskResponse
common/types/mapper/thrift/shared.go:3439:31: t.GetNextEventId undefined (type *shared.PollForDecisionTaskResponse has no field or method GetNextEventId)
  1. The change is quite big already (not only to review but to merge). I'm happy to split this in smaller changes if you want me to (i.e add compatibility first and then modified config files)

Copy link
Contributor

@yycptt yycptt left a comment

Choose a reason for hiding this comment

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

I think make bins failed because the IDL submodule is changed to an old version so the generated thrift files are also changed. The build and test should pass once you updated the IDL to the latest commit 68a720ef059629a0cba5db58f71053100acb7f19 by using git submodule update --remote

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.

6 participants