Skip to content
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

fix: disable sink decouple for trivial sink #18302

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/connector/src/sink/trivial.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@
use std::marker::PhantomData;

use async_trait::async_trait;
use risingwave_common::session_config::sink_decouple::SinkDecouple;

use super::catalog::desc::SinkDesc;
use crate::sink::log_store::{LogStoreReadItem, TruncateOffset};
use crate::sink::{
DummySinkCommitCoordinator, LogSinker, Result, Sink, SinkError, SinkLogReader, SinkParam,
Expand Down Expand Up @@ -64,6 +66,11 @@ impl<T: TrivialSinkName> Sink for TrivialSink<T> {

const SINK_NAME: &'static str = T::SINK_NAME;

// Disable sink decoupling for all trivial sinks because it introduces overhead without any benefit
fn is_sink_decouple(_desc: &SinkDesc, _user_specified: &SinkDecouple) -> Result<bool> {
Ok(false)
}

async fn new_log_sinker(&self, _writer_env: SinkWriterParam) -> Result<Self::LogSinker> {
Ok(Self(PhantomData))
}
Expand Down
Loading