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

[cassandra] Expose timeout and consistency level configuration #5675

Merged

Conversation

mantas-sidlauskas
Copy link
Contributor

What changed?
Allow to change timeout and consistency levels for Cassandra connections.
Default hardcoded values will be applied if no values are provided in configuration

Why?
There was no way to change hard-coded defaults.

How did you test it?

Potential risks

Release notes

Documentation Changes

@coveralls
Copy link

coveralls commented Feb 20, 2024

Pull Request Test Coverage Report for Build 018f104c-e659-4aeb-806d-f0bfe091ee6b

Details

  • 102 of 106 (96.23%) changed or added relevant lines in 2 files are covered.
  • 38 unchanged lines in 9 files lost coverage.
  • Overall coverage increased (+0.04%) to 67.729%

Changes Missing Coverage Covered Lines Changed/Added Lines %
common/persistence/nosql/nosqlplugin/cassandra/plugin.go 21 25 84.0%
Files with Coverage Reduction New Missed Lines %
service/history/task/transfer_standby_task_executor.go 2 86.63%
service/matching/taskReader.go 2 84.88%
common/persistence/historyManager.go 2 66.67%
tools/cli/admin_db_decode_thrift.go 3 69.23%
common/persistence/statsComputer.go 3 96.79%
service/history/task/fetcher.go 3 85.57%
service/history/handler/handler.go 4 53.66%
common/task/fifo_task_scheduler.go 5 84.54%
service/history/execution/mutable_state_task_refresher.go 14 59.81%
Totals Coverage Status
Change from base Build 018f0fc7-2390-4f87-960f-20854a82850f: 0.04%
Covered Lines: 99267
Relevant Lines: 146564

💛 - Coveralls

Comment on lines 116 to 117
Consistency: gocql.ParseConsistency(cfg.Consistency),
SerialConsistency: gocql.ParseSerialConsistency(cfg.SerialConsistency),
Copy link
Member

Choose a reason for hiding this comment

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

can you change these functions to return err instead of panicing? I know toGoCqlConfig is not returning error but it's only caller is doCreateDB which returns error so we can propagate these errors.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

PR for this change: #5811

common/config/config.go Show resolved Hide resolved
@mantas-sidlauskas mantas-sidlauskas marked this pull request as draft March 12, 2024 15:29
@mantas-sidlauskas mantas-sidlauskas force-pushed the gocql_config branch 2 times, most recently from 89efbd7 to 6ddc5fc Compare March 26, 2024 13:24
@mantas-sidlauskas mantas-sidlauskas marked this pull request as ready for review March 26, 2024 13:47
@mantas-sidlauskas mantas-sidlauskas force-pushed the gocql_config branch 2 times, most recently from f177e99 to 6c2bd56 Compare April 4, 2024 16:22
Copy link

codecov bot commented Apr 23, 2024

Codecov Report

Merging #5675 (a255cdb) into master (877d180) will decrease coverage by 0.24%.
The diff coverage is 80.85%.

❗ Current head a255cdb differs from pull request most recent head 1848472. Consider uploading reports for the commit 1848472 to get more accurate results

Additional details and impacted files
Files Coverage Δ
common/config/config.go 59.64% <ø> (ø)
...e/nosql/nosqlplugin/cassandra/gocql/consistency.go 100.00% <100.00%> (ø)
.../persistence/nosql/nosqlplugin/cassandra/plugin.go 3.17% <0.00%> (-0.91%) ⬇️

... and 10 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 877d180...1848472. Read the comment docs.

@taylanisikdemir taylanisikdemir merged commit 1a0c232 into cadence-workflow:master Apr 24, 2024
18 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