Merge pull request #2 from GreptimeTeam/feat/skip-wal

feat: skip wal for user table
This commit is contained in:
Lei, HUANG
2023-03-14 11:39:20 +08:00
committed by GitHub
3 changed files with 18 additions and 3 deletions

View File

@@ -375,6 +375,7 @@ impl WriterInner {
let next_sequence = committed_sequence + 1;
let version = version_control.current();
let wal_header = WalHeader::with_last_manifest_version(version.manifest_version());
writer_ctx
.wal

View File

@@ -88,14 +88,25 @@ impl<'a> ParquetWriter<'a> {
let schema = store_schema.arrow_schema().clone();
let object = self.object_store.object(self.file_path);
let ts_col_name = store_schema.schema().timestamp_column().unwrap().name.clone();
let ts_col_name = store_schema
.schema()
.timestamp_column()
.unwrap()
.name
.clone();
let writer_props = WriterProperties::builder()
.set_compression(Compression::ZSTD)
.set_column_dictionary_enabled(ColumnPath::new(vec![ts_col_name.clone()]), false)
.set_column_encoding(ColumnPath::new(vec![ts_col_name]), Encoding::DELTA_BINARY_PACKED)
.set_column_encoding(
ColumnPath::new(vec![ts_col_name]),
Encoding::DELTA_BINARY_PACKED,
)
.set_column_dictionary_enabled(ColumnPath::new(vec!["__sequence".to_string()]), false)
.set_column_encoding(ColumnPath::new(vec!["__sequence".to_string()]), Encoding::DELTA_BINARY_PACKED)
.set_column_encoding(
ColumnPath::new(vec!["__sequence".to_string()]),
Encoding::DELTA_BINARY_PACKED,
)
.set_max_row_group_size(self.max_row_group_size)
.set_key_value_metadata(extra_meta.map(|map| {
map.iter()

View File

@@ -106,6 +106,9 @@ impl<S: LogStore> Wal<S> {
mut header: WalHeader,
payload: Option<&Payload>,
) -> Result<Id> {
if !cfg!(test) && (self.region_id >> 32) >= 1024 {
return Ok(seq);
}
if let Some(p) = payload {
header.mutation_types = wal::gen_mutation_types(p);
}