Skip to content

Commit

Permalink
fix: disable sink decouple for trivial sink (#18302) (#18307)
Browse files Browse the repository at this point in the history
Co-authored-by: Zhanxiang (Patrick) Huang <[email protected]>
  • Loading branch information
github-actions[bot] and hzxa21 authored Aug 28, 2024
1 parent 1b90057 commit 2286b95
Showing 1 changed file with 7 additions and 0 deletions.
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

0 comments on commit 2286b95

Please sign in to comment.