Merge pull request #1981 from influxdata/writebuffergotcha

fix: Raise kafka max request size to 10M
pull/24376/head
kodiakhq[bot] 2021-07-13 15:55:51 +00:00 committed by GitHub
commit 09a744fce3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View File

@ -203,8 +203,8 @@ pub enum Error {
))] ))]
WritingOnlyAllowedThroughWriteBuffer { db_name: String }, WritingOnlyAllowedThroughWriteBuffer { db_name: String },
#[snafu(display("Cannot write to write buffer: {}", source))] #[snafu(display("Cannot write to write buffer, bytes {}: {}", bytes, source))]
WriteBuffer { source: db::Error }, WriteBuffer { source: db::Error, bytes: u64 },
#[snafu(display("no remote configured for node group: {:?}", node_group))] #[snafu(display("no remote configured for node group: {:?}", node_group))]
NoRemoteConfigured { node_group: NodeGroup }, NoRemoteConfigured { node_group: NodeGroup },
@ -805,7 +805,9 @@ where
db_name: db_name.into(), db_name: db_name.into(),
} }
} }
db::Error::WriteBufferWritingError { .. } => Error::WriteBuffer { source: e }, db::Error::WriteBufferWritingError { .. } => {
Error::WriteBuffer { source: e, bytes }
}
_ => Error::UnknownDatabaseError { _ => Error::UnknownDatabaseError {
source: Box::new(e), source: Box::new(e),
}, },

View File

@ -126,6 +126,7 @@ impl KafkaBufferProducer {
let mut cfg = ClientConfig::new(); let mut cfg = ClientConfig::new();
cfg.set("bootstrap.servers", &conn); cfg.set("bootstrap.servers", &conn);
cfg.set("message.timeout.ms", "5000"); cfg.set("message.timeout.ms", "5000");
cfg.set("max.request.size", "10000000");
let producer: FutureProducer = cfg.create()?; let producer: FutureProducer = cfg.create()?;