Skip to content

Commit b5ad7d3

Browse files
author
Devdutt Shenoi
committed
fix: byte size calculation
1 parent acc6412 commit b5ad7d3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/handlers/http/modal/utils/ingest_utils.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ pub async fn push_logs(
8181
)?;
8282

8383
for value in data {
84-
let size = value.to_string().into_bytes().len();
84+
let size = serde_json::to_vec(&value).unwrap().len(); // string length need not be the same as byte length
8585
let parsed_timestamp = get_parsed_timestamp(&value, time_partition.as_ref());
8686
let partition_values = match custom_partition.as_ref() {
8787
Some(custom_partition) => {

0 commit comments

Comments
 (0)