-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
permit underlying conn to implement batch interface directly #3237
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
30d8691
to
3f3b8bd
Compare
@AudriusButkevicius Sorry for the confusion here, this is entirely my fault. Could you please consent as the GoogleBot is asking? Regarding the release: This is more ad-hoc. Wasn't planning to cut a new release any time soon, unless there's a reason to do so. Would the batch-read something you'd be interested in having released soon? |
Codecov Report
@@ Coverage Diff @@
## master #3237 +/- ##
==========================================
- Coverage 85.46% 85.44% -0.01%
==========================================
Files 133 133
Lines 9799 9804 +5
==========================================
+ Hits 8374 8377 +3
Misses 1052 1052
- Partials 373 375 +2
Continue to review full report at Codecov.
|
@googlebot I consent. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Syncthing is stuck on an old version of quic-go as we are wary of breaking connectivity between versions like we did in the past by not reading quic-go release notes about compatability. I guess now that RFC9000 is out, we should upgrade and keep rolling it forward, as I trust it should now never become incompatible. Also, as part of that I'd like to pick up the batch reading code, not that I think the optimisations matter much, as we do our own reads and then fake a net.PacketConn anyway (to filter out stun packets via my pfilter package), but more so that the method quic-go uses to read packets would not change in the future release. Namely upgrading to the current latest release will give us RFC9000, which is great, but it still uses ReadUdpMsg (which we implement) but the next release would move to batch reads, meaning pfilter package would have to play catch up. I'd rather quic-go was released, I'd update pfilter to support ReadBatch, and forget about it (atleast until quic-go changes something again). Ideally, quic-go would provide a way to read packets it does not recognize to be quic packets, that way I would not need pfilter package at all and could give quic-go a real net.UDPConn and trust that I somehow can recover stun packets that arrived on the same net.UDPConn, without really caring how quic-go implemente reads from net.UDPConn |
That shouldn't be a problem if you're using tagged releases. As long as the QUIC (draft) version matches, it should be interoperable. Depending on how old your quic-go version is though, we might have dropped support for that particular draft version in a later release.
Sounds like a good idea. That version will be supported for a long time. |
I think that is exactly what happened, and our current version is 19.3, so I think we are going to have a breaking change regardless, as we move towards RFC9000. Given the releases are ad-hoc, are you waiting for some specific PRs to land before you move forward? I guess I could upgrade us to the latest untagged commit, and assume nothing will break between that and the next future tag. |
Not really, although I'd probably want #3230 to go in (mind giving me a review, should be very straightforward?). Once that's in, I could cut a new release, there've been a couple of important changes since the last one. |
@marten-seemann does quic-go provide a mechanism like this? I'm not a go dev but |
It doesn't, mainly because of the implementation complexity: There are a lot of places where we drop packets, for various reasons (grep the code for |
That said, if anyone comes up with a solution that's not super ugly I'd be willing to consider it. |
I reverted #3236 because I messed up the merge. This PR adds the changes.