feat: Support Leader Aware Routing#78
Conversation
| # limitations under the License. | ||
|
|
||
|
|
||
| module Google |
There was a problem hiding this comment.
I am not sure why do we need a separate place to handle this as the context for calling these methods are still with the respective methods why not just default the values in place itself ?
There was a problem hiding this comment.
Mostly to facilitate future changes easily. I first used the default values in place. But soon I found that these "magical constants" were spread across the codebase, making it harder to spot any specific values in the future. So I moved them to this helper module.
There was a problem hiding this comment.
I think that's fine. However, the downside of doing this is that these values are separated from their context so it's less clear what they are for. So I recommend making sure we document each of the methods here with what the value is used for (and maybe under what circumstances it might change in the future).
There was a problem hiding this comment.
I added description at the top of the module explaining the context, and when the values can differ.
I avoided commenting for individual methods to avoid duplication. But let me know if the present documentation doesn't suffice. I'll make changes.
dazuma
left a comment
There was a problem hiding this comment.
A few minor comments, otherwise looks good.
| # limitations under the License. | ||
|
|
||
|
|
||
| module Google |
There was a problem hiding this comment.
I think that's fine. However, the downside of doing this is that these values are separated from their context so it's less clear what they are for. So I recommend making sure we document each of the methods here with what the value is used for (and maybe under what circumstances it might change in the future).
This PR implements Leader Aware Routing (LAR) for the Ruby Spanner client. For background design, see http://shortn/_5ecDWu2XD9 (internal)
Note:
Tests