shotover / shotover-proxy

L7 data-layer proxy
https://docs.shotover.io
Apache License 2.0
87 stars 18 forks source link

Routing fixes #1815

Closed rukai closed 2 weeks ago

rukai commented 2 weeks ago

This PR includes 2 unrelated changes to routing:

  1. prefetch required routing metadata for DeleteRecords and OffsetDelete.
  2. Change RequestSplitAndRouter::get_request_frame to return &mut Self::Request instead of Option<&mut Self::Request>
    • This does not change functionality or fix anything but makes it easier to catch mistakes
    • The caller ignored the value if it was None which made for a very tricky to track down issue due to a typo when implementing https://github.com/shotover/shotover-proxy/pull/1814
    • This approach immediately panics if we pass in the wrong type which is good since it indicates an unrecoverable programmer error.

I dont think the performance regression is meaningful. While it is a kafka benchmark it is purely benching the encoder/decoder which I didnt touch in this PR.

codspeed-hq[bot] commented 2 weeks ago

CodSpeed Performance Report

Merging #1815 will not alter performance

Comparing rukai:routing_fixes (9c8300a) with main (65ce7cb)

Summary

✅ 38 untouched benchmarks