-
Notifications
You must be signed in to change notification settings - Fork 6
feat: expose more connectionId information
#73
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
Conversation
Changes: * Exposed connection destination ID * Created a common ID that is identical for both sides of the connection. Derived from the source and destination ID. * The `quiche` connection is now the Source Of Truth for these IDs. The destinationId is only know after establishing and is only valid while running. * Added test demonstrating the new Ids and how they relate to each other. Related: MatrixAI/Polykey#609 [ci skip]
|
It made more sense to me to get the source ID and destination ID from quiche. It would be the best source of truth. It's possible that these can change over the life of the connection and that would cause problems with QUICSocket logic. But that would only happen if the connection switches paths and I don't think we currently support that. |
|
I'd like the logging messages for connections to use a shared connection ID that is the same for both sides of the connection. |
|
I don't think connection IDs can change. There is a connection migration thing but the ID is meant to be stable. I'm wondering what is the main reason to expose these IDs and that the existing connection ID isn't sufficient? |
|
We only expose the source ID of the connection. But there are two IDs, the source and destination, these are reversed when comparing the two ends of the connection. So both sides have a different On top of that, I needed some kind of information that is shared between the two connections for making some decisions in MatrixAI/Polykey#592. So it's just good to have. |
|
I don't know the details, but I think connection IDs can change when the connection migrates. |
Errors either bubble up or are handled at some point. Decision to log them out should be made there. IMO we should rarely use `error` level logs because errors are either caught and handled and therefor not exceptional. Or bubble to the top in which case the program crashes. [ci skip]
|
|
https://docs.rs/quiche/latest/quiche/struct.Connection.html#method.source_id So according to |
|
I've changed any |

Description
I need to expose more
connectionIdinformation so I compare connections better. This exposes the destination id asconnectionIdPeerof the connection as well as a derivedconnectionIdShared.Changes:
quicheconnection is now the Source Of Truth for these IDs. The destinationId is only know after establishing and is only valid while running.As for logging, I'm switching non-internal connection and stream error logs to debug level. closing stream or connection with a non-0 code is not exceptional. Internal errors are.
Issues Fixed
Tasks
connectionIdinformation on theQUICConnection.ERRORandWARNlevel logs for failing connections and streams. Application can make a decision to log these as errors or not.Final checklist