Skip to content

Commit

Permalink
fix: disable sink decouple for trivial sink (#18302)
Browse files Browse the repository at this point in the history
  • Loading branch information
hzxa21 authored Aug 28, 2024
1 parent 14a46ff commit befb04f
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
@@ -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,
@@ -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))
}

0 comments on commit befb04f

Please sign in to comment.