Skip to content

[dbsp] Make DevTweaks public so it will get documented.#5941

Open
blp wants to merge 2 commits intomainfrom
devtweaks
Open

[dbsp] Make DevTweaks public so it will get documented.#5941
blp wants to merge 2 commits intomainfrom
devtweaks

Conversation

@blp
Copy link
Copy Markdown
Member

@blp blp commented Mar 27, 2026

Describe Manual Test Plan

I ran the unit tests.

Signed-off-by: Ben Pfaff <blp@feldera.com>
@blp blp requested review from anandbraman and gz March 27, 2026 22:24
@blp blp self-assigned this Mar 27, 2026
@blp blp added documentation Improvements or additions to documentation DBSP core Related to the core DBSP library API Distributed system APIs User-facing For PRs that lead to Feldera-user visible changes user-reported Reported by a user or customer labels Mar 27, 2026
Signed-off-by: feldera-bot <feldera-bot@feldera.com>
Copy link
Copy Markdown

@mythical-fred mythical-fred left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean extraction. The move to Option<T> fields with explicit accessors is the right approach for a public, documented struct.

use serde::{Deserialize, Serialize};
use utoipa::ToSchema;

/// Optional settings for tweaking Feldera internals.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to say something about how these are not guaranteed to be a stable API?

multihost: if runtime_config.hosts > 1
|| runtime_config.dev_tweaks.contains_key("multihost")
{
multihost: if runtime_config.hosts > 1 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this one is gone?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was an experiment that I used for testing while developing the multihost feature. I forgot about it. It's not needed anymore.

/// storage, such as object storage, but it could use excessive amounts of
/// memory if the number of keys fetched is very large.
#[serde(skip_serializing_if = "Option::is_none")]
pub fetch_join: Option<bool>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name does not suggest the same thing that the documentation describes, but it's probably too late to change that.

/// storage, such as object storage, but it could use excessive amounts of
/// memory if the number of keys fetched is very large.
#[serde(skip_serializing_if = "Option::is_none")]
pub fetch_distinct: Option<bool>,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as before

/// each step.
///
/// The default value is 10,000 records.
// TODO: splitter_chunk_size_bytes, per-operator chunk size.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this TODO.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know this either. It is a copy of a @ryzhyk comment, so he might chime in.

#[serde(skip_serializing_if = "Option::is_none")]
pub adaptive_joins: Option<bool>,

/// The minimum relative improvement threshold for the join balancer.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "adaptive" and "balanced" are the same thing, but the names of the fields do not make it clear. Perhaps the comments should.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I need @ryzhyk's feedback on that too.

self.adaptive_joins.unwrap_or(false)
}

pub fn balancer_min_relative_improvement_threshold(&self) -> f64 {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why sometimes empty lines and sometimes no?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mistake. I will fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API Distributed system APIs DBSP core Related to the core DBSP library documentation Improvements or additions to documentation User-facing For PRs that lead to Feldera-user visible changes user-reported Reported by a user or customer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants