Skip to content

Commit

Permalink
feat: data buffer and related structs (#3329)
Browse files Browse the repository at this point in the history
* feat: data buffer and related structs

* fix: some cr comments

* chore: remove freeze_threshold in DataBuffer

* fix: use LazyMutableVectorBuilder instead of two vector; add option to control dedup

* fix: dedup rows according to both pk weights and timestamps

* fix: assembly DataBatch on demand
  • Loading branch information
v0y4g3r authored Feb 20, 2024
1 parent 3dfe4a2 commit 450dfe3
Show file tree
Hide file tree
Showing 3 changed files with 946 additions and 6 deletions.
12 changes: 10 additions & 2 deletions src/mito2/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ use crate::worker::WorkerId;
#[stack_trace_debug]
pub enum Error {
#[snafu(display(
"Failed to set region {} to writable, it was expected to replayed to {}, but actually replayed to {}",
region_id, expected_last_entry_id, replayed_last_entry_id
"Failed to set region {} to writable, it was expected to replayed to {}, but actually replayed to {}",
region_id, expected_last_entry_id, replayed_last_entry_id
))]
UnexpectedReplay {
location: Location,
Expand Down Expand Up @@ -559,6 +559,13 @@ pub enum Error {

#[snafu(display("Encode null value"))]
IndexEncodeNull { location: Location },

#[snafu(display("Failed to encode memtable to Parquet bytes"))]
EncodeMemtable {
#[snafu(source)]
error: parquet::errors::ParquetError,
location: Location,
},
}

pub type Result<T, E = Error> = std::result::Result<T, E>;
Expand Down Expand Up @@ -662,6 +669,7 @@ impl ErrorExt for Error {
FilterRecordBatch { source, .. } => source.status_code(),
Upload { .. } => StatusCode::StorageUnavailable,
BiError { .. } => StatusCode::Internal,
EncodeMemtable { .. } => StatusCode::Internal,
}
}

Expand Down
Loading

0 comments on commit 450dfe3

Please sign in to comment.