-
Notifications
You must be signed in to change notification settings - Fork 552
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
transform-sdk/rust: borrow output record #16210
Conversation
We only need to borrow the output record. To do that we make the writer take `Into<BorrowedRecord<'_>>`, so that it can take any type of record for transforms (we can now do no copy transforms!). Since `Into<_>` is a trait, we can't have a monomorphic trait take a monomorphic trait as a function argument (see https://doc.rust-lang.org/reference/items/traits.html#object-safety). So we wrap our current trait in a struct that handles resolving the trait argument to the concrete type our write function will take. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
Reuse input and output buffers for better performance. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
new failures in https://buildkite.com/redpanda/redpanda/builds/44051#018d2aa4-18c0-4c78-9bf4-f22d1fcd2882:
new failures in https://buildkite.com/redpanda/redpanda/builds/44051#018d2aa4-18ba-4a6e-b0d0-a9b62da64ad7:
new failures in https://buildkite.com/redpanda/redpanda/builds/44051#018d2acb-b10e-4f6e-95d1-651675e7fd32:
new failures in https://buildkite.com/redpanda/redpanda/builds/44051#018d2acb-b116-402f-a369-1ef80de16745:
new failures in https://buildkite.com/redpanda/redpanda/builds/44051#018d2acb-b110-4729-9708-fd287cd98d26:
new failures in https://buildkite.com/redpanda/redpanda/builds/44051#018d2acb-b113-4d91-8f9d-33929be24ea6:
|
ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44051#018d2acb-b116-402f-a369-1ef80de16745 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44051#018d2acb-b110-4729-9708-fd287cd98d26 ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44318#018d42de-2964-4ec3-9aac-04581d16cefa ducktape was retried in https://buildkite.com/redpanda/redpanda/builds/44318#018d42ef-b919-4f4e-b331-b959e8a41931 |
/ci-repeat |
/ci-repeat |
Add the same docs we have for Golang, but in Rust. Signed-off-by: Tyler Rockwood <rockwood@redpanda.com>
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.
Really nice! I love learning new things about rust whenever I read rust code :)
Our good friend CloudStorageTimingStressTest 😞 #15950 |
/backport v23.3.x |
We only need to borrow the output record. To do that we make the writer
take
Into<BorrowedRecord<'_>>
, so that it can take any type of recordfor transforms (we can now do no copy transforms!).
Since
Into<_>
is a trait, we can't have a monomorphic trait take amonomorphic trait as a function argument (see
https://doc.rust-lang.org/reference/items/traits.html#object-safety). So
we wrap our current trait in a struct that handles resolving the trait
argument to the concrete type our write function will take.
Backports Required
Release Notes