fix: Remove now-unused db_name argument to encode_write

pull/24376/head
Carol (Nichols || Goulding) 2022-11-14 15:19:20 -05:00
parent 4d4cdebbda
commit f4b8fe7751
No known key found for this signature in database
GPG Key ID: E907EE5A736F87D4
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ use mutable_batch::MutableBatch;
use schema::InfluxColumnType; use schema::InfluxColumnType;
/// Convert a [`DmlWrite`] to a [`DatabaseBatch`] /// Convert a [`DmlWrite`] to a [`DatabaseBatch`]
pub fn encode_write(_db_name: &str, database_id: i64, write: &DmlWrite) -> DatabaseBatch { pub fn encode_write(database_id: i64, write: &DmlWrite) -> DatabaseBatch {
DatabaseBatch { DatabaseBatch {
table_batches: write table_batches: write
.tables() .tables()

View File

@ -27,7 +27,7 @@ fn generate_pbdata_bytes() -> Vec<(String, (usize, Bytes))> {
"bananas".into(), "bananas".into(),
Default::default(), Default::default(),
); );
let database_batch = mutable_batch_pb::encode::encode_write("db", 42, &write); let database_batch = mutable_batch_pb::encode::encode_write(42, &write);
let mut bytes = BytesMut::new(); let mut bytes = BytesMut::new();
database_batch.encode(&mut bytes).unwrap(); database_batch.encode(&mut bytes).unwrap();

View File

@ -214,7 +214,7 @@ pub fn encode_operation(
let payload = match operation { let payload = match operation {
DmlOperation::Write(write) => { DmlOperation::Write(write) => {
let namespace_id = write.namespace_id().get(); let namespace_id = write.namespace_id().get();
let batch = mutable_batch_pb::encode::encode_write(db_name, namespace_id, write); let batch = mutable_batch_pb::encode::encode_write(namespace_id, write);
Payload::Write(batch) Payload::Write(batch)
} }
DmlOperation::Delete(delete) => Payload::Delete(DeletePayload { DmlOperation::Delete(delete) => Payload::Delete(DeletePayload {