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
provides lease extension spec #311
base: master
Are you sure you want to change the base?
Conversation
daf81c3
to
0c3d3a3
Compare
0c3d3a3
to
7fb802c
Compare
d791254
to
dc64b5f
Compare
dc64b5f
to
3a6f1e2
Compare
[wk]: WellKnownLeaseStrategies.md | ||
|
||
Note, if the selected lease strategy has a different frame layout than the default one, the first [`LEASE`][lf] frame MUST follow the default [`LEASE`][lf] frame layout, in order to let the `Client` read metadata field content | ||
|
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.
This should also deal with the possibility that a server does not specify any strategy in the LEASE
frame such as when the server is unaware of and does not support the extension. I suppose in that case "Request Count" is chosen by default although the client may not have included that in its list of choices. Should "Request Count" be required then as a fallback?
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.
also, we should mention that the first lease frame may have zero ttl and zero permits in order to specify lease preferences
|
||
### Handling Unexpected | ||
|
||
If `Server` does not specify lease strategy defined in the [negotiation](#negotiation) section, the `Client` MUST close the connection with the __CONNECTION_ERROR__ [Error Code][ec] and reestablishe connection without specifying lease strategies or without leasing at all. |
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.
typo reestablishe
-> reestablish
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.
Protocol lease semantics section also need to be adapted with support for new lease strategies.
But I'm really curious, is it really ok, to change layout of frame, by extension? Isn't it better (if possible) to change layout of lease frame to have some Lease payload
that will be decoded differently, depending on specified strategy. Almost nothing will be changed, except, that current default lease strategy description will be moved from core protocol, and so it will be easily understandable, that lease frame payload can be different (something similar to authentication spec). Such change is more related to how, it will be written in spec, and should not affect implementation details, described in proposal
Co-authored-by: Oleg Yukhnevich <whyoleg@gmail.com>
This PR provides a Lease frame extension so now one can override a default Lease strategy and provide one of the supported or event implement a custom one using
CompositeMetadata
extensions during the setup phase.Note, this does not break existing Lease spec and is just an addition which is enabled only when the Metadata Payload content is present in the setup metadata