Repository: risingwavelabs/risingwave
File: src/common/src/config/streaming.rs (Rust)

Code before:
    pub refresh_scheduler_interval_sec: u64,

    /// Determine which encoding will be used to encode join rows in operator cache.
    #[serde(default)]
    pub join_encoding_type: JoinEncodingType,

    /// The timeout for reading from the buffer of the sync log store on barrier.
    /// Every epoch we will attempt to read the full buffer of the sync log store.
    /// If we hit the timeout, we will stop reading and continue.
    #[serde(default = "default::developer::sync_log_store_pause_duration_ms")]
    pub sync_log_store_pause_duration_ms: usize,

    /// The max buffer size for sync logstore, before we start flushing.
    #[serde(default = "default::developer::sync_log_store_buffer_size")]
    pub sync_log_store_buffer_size: usize,

    /// Cache policy for partition cache in streaming over window.
    /// Can be `full`, `recent`, `recent_first_n` or `recent_last_n`.
    #[serde(default)]
    pub over_window_cache_policy: OverWindowCachePolicy,

    /// When enabled, vnode stats pruning is in dry-run mode.
    /// In this mode, we still maintain vnode stats and verify that pruning would be correct,
    /// but we don't actually use the pruning results - we still use cache and storage to
    /// fulfill the read. This is useful for validating the correctness of vnode stats pruning
    /// before enabling it in production.
    #[serde(default = "default::developer::enable_state_table_vnode_stats_prunning")]
    pub enable_state_table_vnode_stats_prunning: bool,

    #[serde(default, flatten)]
    #[serde_prefix_all(skip)]
    #[config_doc(omitted)]
    pub unrecognized: Unrecognized<Self>,
}

impl StreamingDeveloperConfig {
    pub fn snapshot_iter_rebuild_interval(&self) -> Duration {
        let rebuild_interval = if self.snapshot_iter_rebuild_interval_secs < 10 {
            tracing::warn!(
                "too small rebuild_interval {} second. rewrite to 10",
                self.snapshot_iter_rebuild_interval_secs
            );
            10
        } else {
            self.snapshot_iter_rebuild_interval_secs
        };
        Duration::from_secs(rebuild_interval)
    }
}

impl StreamingConfig {

Review comment (performance):
The documentation is inconsistent with the implementation. The documentation states "When enabled, vnode stats pruning is in dry-run mode" which suggests that when the flag is true, dry-run mode is active. However, the code implementation shows the opposite behavior: when the flag is true, pruning is actually applied (production mode), and when false, dry-run mode is active. Either the documentation needs to be corrected to say "When disabled, vnode stats pruning is in dry-run mode" or the implementation logic needs to be inverted throughout the codebase.
```suggestion
    /// When enabled, vnode stats pruning is applied in production.
    /// When disabled, vnode stats pruning is in dry-run mode: we still maintain vnode stats
    /// and verify that pruning would be correct, but we don't actually use the pruning
    /// results — we still use cache and storage to fulfill the read. This is useful for
    /// validating the correctness of vnode stats pruning before enabling it in production.
```

Code after:
    pub refresh_scheduler_interval_sec: u64,

    /// Determine which encoding will be used to encode join rows in operator cache.
    #[serde(default)]
    pub join_encoding_type: JoinEncodingType,

    /// The timeout for reading from the buffer of the sync log store on barrier.
    /// Every epoch we will attempt to read the full buffer of the sync log store.
    /// If we hit the timeout, we will stop reading and continue.
    #[serde(default = "default::developer::sync_log_store_pause_duration_ms")]
    pub sync_log_store_pause_duration_ms: usize,

    /// The max buffer size for sync logstore, before we start flushing.
    #[serde(default = "default::developer::sync_log_store_buffer_size")]
    pub sync_log_store_buffer_size: usize,

    /// Cache policy for partition cache in streaming over window.
    /// Can be `full`, `recent`, `recent_first_n` or `recent_last_n`.
    #[serde(default)]
    pub over_window_cache_policy: OverWindowCachePolicy,

    /// When enabled, vnode stats pruning is applied in production.
    /// When disabled, vnode stats pruning is in dry-run mode: we still maintain vnode stats
    /// and verify that pruning would be correct, but we don't actually use the pruning
    /// results — we still use cache and storage to fulfill the read. This is useful for
    /// validating the correctness of vnode stats pruning before enabling it in production.
    #[serde(default = "default::developer::enable_state_table_vnode_stats_pruning")]
    pub enable_state_table_vnode_stats_pruning: bool,

    #[serde(default, flatten)]
    #[serde_prefix_all(skip)]
    #[config_doc(omitted)]
    pub unrecognized: Unrecognized<Self>,
}

impl StreamingDeveloperConfig {
    pub fn snapshot_iter_rebuild_interval(&self) -> Duration {
        let rebuild_interval = if self.snapshot_iter_rebuild_interval_secs < 10 {
            tracing::warn!(
                "too small rebuild_interval {} second. rewrite to 10",
                self.snapshot_iter_rebuild_interval_secs
            );
            10
        } else {
            self.snapshot_iter_rebuild_interval_secs
        };
        Duration::from_secs(rebuild_interval)
    }
}

impl StreamingConfig {