-
Notifications
You must be signed in to change notification settings - Fork 99
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
configurable topology refresh duration #776
configurable topology refresh duration #776
Conversation
… to ClusterWorker struct, which is now used instead of old creating new Dutaion instance
…h_interval of type Duration which is consumed by ClusterWorker
…erval to set the Duration for refreshing the topology
…topology refresh duration
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.
To be precise, the parameter that you introduced affects how frequently the whole cluster metadata is refreshed. Cluster metadata not only contains information about the cluster topology, but also information about the cluster schema. The issue #232 was created long ago, when the only metadata that the driver used to fetch in ClusterWorker::perform_refresh()
was indeed cluster topology, but it has changed since.
I think the current behavior of the parameter is fine and it can control fetching of the whole metadata, but the names used in the code and in the documentation should be adjusted.
Apart from that and some other small comments - looks good.
I don't have a good idea on how to write a good test for this. Usually, a |
…vent cluster_metadata_refesh_interval
… so that it iss more clear to understand
Hi @piodul, are any further changes needed? Let me know in case you missed this. |
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.
There are a number of places with names still containing "topology refresh" instead of "metadata refresh". Please fix them.
80a72bb
to
3d6a177
Compare
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.
Thanks, LGTM.
Whoever maintainer is going to merge this, I highly recommend squash&merge.
@rishabharyal Sorry, I was out on vacation for the last two weeks. |
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.
LGTM, and thanks for the contribution!
This pull requests a configurable way to topology refresh duration. Two files session.rs and cluster.rs have been modified to set the session configuration and consume the duration configuration respectively.
Note: I am not sure if we need any test cases in this case as the duration is still provided from where its called.
./docs/source/
.Fixes:
annotations to PR description.Fixes: #232