Skip to content

Commit

Permalink
Revert "[Native] Use mimalloc in native libs (#500)" (#501)
Browse files Browse the repository at this point in the history
This reverts commit 9445b7b.
  • Loading branch information
xuchen-plus authored Jun 27, 2024
1 parent 9445b7b commit dd4f7c2
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ public void closeCurrentBatch() {
nativeColumnVector = null;
}
if (columnarBatch != null) {
columnarBatch.close();
columnarBatch = null;
}
}
Expand Down
21 changes: 0 additions & 21 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ bytes = "1.4.0"
half = "^2.1"
tracing = "0.1.40"
thiserror = "1.0"
anyhow = "1.0.79"
mimalloc = { version = "0.1.43", features = ["local_dynamic_tls"] }
anyhow = "1.0.79"
1 change: 0 additions & 1 deletion rust/lakesoul-io-c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ proto = { path = "../proto" }
prost = { workspace = true }
log = "0.4.20"
env_logger = "0.11"
mimalloc = { workspace = true }


[target.'cfg(target_os = "windows")'.dependencies]
Expand Down
21 changes: 9 additions & 12 deletions rust/lakesoul-io-c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,24 @@ use std::ptr::NonNull;
use std::slice;
use std::sync::Arc;

use bytes::BufMut;

use arrow::array::Array;
pub use arrow::array::StructArray;
use arrow::datatypes::{Schema, SchemaRef};
pub use arrow::ffi::{FFI_ArrowArray, FFI_ArrowSchema};
use arrow::ffi::from_ffi;
use bytes::BufMut;
pub use arrow::ffi::{FFI_ArrowArray, FFI_ArrowSchema};
use datafusion_substrait::substrait::proto::Plan;
use log::debug;
use mimalloc::MiMalloc;
use prost::Message;
use tokio::runtime::{Builder, Runtime};

use lakesoul_io::helpers;
use lakesoul_io::lakesoul_io_config::{LakeSoulIOConfig, LakeSoulIOConfigBuilder};
use lakesoul_io::lakesoul_reader::{LakeSoulReader, RecordBatch, Result, SyncSendableMutableLakeSoulReader};
use lakesoul_io::lakesoul_writer::SyncSendableMutableLakeSoulWriter;
use log::debug;
use proto::proto::entity;

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

#[allow(non_camel_case_types)]
pub type c_size_t = usize;
#[allow(non_camel_case_types)]
Expand Down Expand Up @@ -927,11 +924,11 @@ mod tests {

use crate::{
create_lakesoul_io_config_from_builder, create_lakesoul_reader_from_config, create_lakesoul_writer_from_config,
flush_and_close_writer, free_lakesoul_reader, IOConfigBuilder,
lakesoul_config_builder_add_single_file, lakesoul_config_builder_add_single_primary_key,
lakesoul_config_builder_set_batch_size, lakesoul_config_builder_set_max_row_group_size,
lakesoul_config_builder_set_object_store_option, lakesoul_config_builder_set_schema, lakesoul_config_builder_set_thread_num,
lakesoul_reader_get_schema, next_record_batch, start_reader, tokio_runtime_builder_set_thread_num, write_record_batch,
flush_and_close_writer, free_lakesoul_reader, lakesoul_config_builder_add_single_file,
lakesoul_config_builder_add_single_primary_key, lakesoul_config_builder_set_batch_size,
lakesoul_config_builder_set_max_row_group_size, lakesoul_config_builder_set_object_store_option,
lakesoul_config_builder_set_schema, lakesoul_config_builder_set_thread_num, lakesoul_reader_get_schema,
next_record_batch, start_reader, tokio_runtime_builder_set_thread_num, write_record_batch, IOConfigBuilder,
};

fn set_object_store_kv(builder: NonNull<IOConfigBuilder>, key: &str, value: &str) -> NonNull<IOConfigBuilder> {
Expand Down
1 change: 0 additions & 1 deletion rust/lakesoul-metadata-c/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ prost = {workspace = true}
serde_json = "1.0.111"
log = {workspace = true}
env_logger = "0.11"
mimalloc = { workspace = true }
4 changes: 0 additions & 4 deletions rust/lakesoul-metadata-c/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use std::io::Write;
use std::ptr::{null, null_mut, NonNull};

use log::debug;
use mimalloc::MiMalloc;
use prost::bytes::BufMut;
use prost::Message;

Expand All @@ -20,9 +19,6 @@ use lakesoul_metadata::transfusion::SplitDesc;
use lakesoul_metadata::{Builder, Client, MetaDataClient, PreparedStatementMap, Runtime};
use proto::proto::entity;

#[global_allocator]
static GLOBAL: MiMalloc = MiMalloc;

#[allow(non_camel_case_types)]
pub type c_size_t = usize;
#[allow(non_camel_case_types)]
Expand Down

0 comments on commit dd4f7c2

Please sign in to comment.