-
Notifications
You must be signed in to change notification settings - Fork 563
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
[v23.3.x] Wire transform::logging::manager into transform API, rpc client #16663
[v23.3.x] Wire transform::logging::manager into transform API, rpc client #16663
Conversation
rpc::create_transform_logs_topic - create model::transform_log_internal_topic - subject to existing rpc::client retry policy, 5x max, exponential backoff from 100ms - partition count reflects config::default_topic_partitions - batch_max_bytes reflects config::kafka_batch_max_bytes - topic cannot be produced to or deleted via Kafka API Also adds condition to cluster::health_manager to bump topic replication if node count increases from 1 to 3. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 9e357d1)
Previously model::transform_name. Building the iobuf here simplifies downstream record batching logic slightly. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 6463799)
This way the new value gets picked up by the condition variable right away. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 91ce99e)
Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit c41eaa1)
To create the transform logs topic on demand. Also adds code in log_manager.cc to perform this operation lazily at flush time. Additionally, update logging::client to return transform::logging::errc (or a result<> thereof). This becomes increasingly useful for error reporting as we start hooking things up to the rest of the cluster. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit d59c928)
A comment on model::packed_record_batch_header_size reflected a presumably outdated value for the constant. Was 57, should be 61. Replaces that comment with a static_assert to avoid similar errors in future. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 5280839)
This is slightly easier to test and reason about, as well as being nominally less costly in terms of buffer capacity. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit f036951)
``` record( record_attributes attributes, int64_t timestamp_delta, int32_t offset_delta, iobuf key, iobuf value, std::vector<record_header> hdrs) ``` (cherry picked from commit a637233)
06875e0
to
d600c58
Compare
/dt |
Encapsulates a storage::record_batch_builder and aims to build up batches of log records. Batches are kept under a specified maximum size to avoid data loss. If appending a given kvp would cause a batch to exceed the specified max, we roll to a new builder, appending the previous batch to a running collection of completed, size-limited record_batches. Includes a simple unit test for constructed record_batch sizes. (cherry picked from commit ddea1e2)
Adapts transform::rpc::client for transform logging purposes. Implements transform::logging::client. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 9562bbd)
Also Add sharded<metadata_cache> field to transform::service in service of transform::logging::rpc_client. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 38f99f9)
Previously a static method on a SCRAM test. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit ad2c4e6)
Includes a slightly modified identity transform that also logs the incoming record to stderr. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit a7f6ba0)
The previous handling was incorrect (awaiting on an invalid future), this probably shouldn't fail silently, and everything in logging::manager::start is noexcept anyway. Signed-off-by: Oren Leiman <oren.leiman@redpanda.com> (cherry picked from commit 84dac04)
d600c58
to
3b41a9d
Compare
force push headers 😐 |
/dt |
For anyone reviewing - cherry-picks two PRs (see description). Mostly clean, changes were headers and a couple of wonky textual diffs. Nothing functional (incl tests). |
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.
eyeballed the original PR and this one and appears to be good
Thanks @michael-redpanda! |
Backport of PR #16485
Closes #16570
Closes #16572