-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add database/transaction option to control includePort behavior in get_addresses_for_key #2060
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
Add database/transaction option to control includePort behavior in get_addresses_for_key #2060
Conversation
|
[Out of curiosity] Can you please elaborate what problem this PR tries to solve? |
|
I've been interested in something like this too, but I think I might prefer either just changing the function to only do full addresses or adding an extra argument to the function to enable it. This approach is certainly simpler than adding a new argument everywhere, but it also seems a little arbitrary to a user of the API. |
We made this change unconditionally in fdb3, and our application now relies on the port number being present. The idea is to take advantage of the fact that \xff\xff keys never have a physical location to allow a caller to opt in to getting the port without breaking any existing callers
I prefer this too, but I think we need to wait for an api version bump to change this behavior. This is intended as an undocumented backdoor that we can use until then. |
The unfortunate thing about this is that I'm not sure we can ever really remove this once we add it. We'd have to at least continue supporting it for this API version, even if it we remove it in future ones. |
|
To give some context on this: We introduced a change in our FDB 3 code to return I talked to Evan about this and he suggested to do this hack with the We also discussed adding a new API version for a patch version, but IMHO this is ugly as it breaks expectations that we are stable within releases. We could also add a new function, but this will be even more painful to maintain in the future. So overall we are very sorry that we missed this :( But we will need some mechanism to support this. |
|
I think my overall preference for this is to not use the EDIT: I just noticed your reply on the other comment chain after I submitted this. |
|
It sounds like we're all (relatively) happy with using a database or transaction option, and then deprecating it in fdb 7? I'll get started on that. |
ajbeamon
left a comment
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 few other places where we would normally document options (Python and Ruby bindings at least), but perhaps given the circumstances of this it may not be necessary. There is also some code in the binding testers for each language that tries setting this option to make sure that the binding can do so without some weird result. That again may or may not be necessary.
The last thing that is potentially relevant here is a release note.
|
Done. I figure I might as well add all documentation and testing properly, since other users may find the port useful and not want to wait for the next release. PTAL |
Co-Authored-By: A.J. Beamon <[email protected]>
ajbeamon
left a comment
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.
I think this looks good. I'll merge when the tests are done.
CC @mpilman