Skip to content

Commit

Permalink
fix: bugs detected by ut
Browse files Browse the repository at this point in the history
  • Loading branch information
ShiKaiWi committed Apr 9, 2023
1 parent fe59ce2 commit 67543cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion analytic_engine/src/instance/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,8 @@ impl Drop for SpaceStore {

impl SpaceStore {
async fn close(&self) -> Result<()> {
todo!("close all background jobs");
// TODO: close all background jobs.
Ok(())
}
}

Expand Down
6 changes: 4 additions & 2 deletions analytic_engine/src/instance/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ impl<'a> Writer<'a> {
/// Do the actual write, must called by write worker in write thread
/// sequentially.
pub(crate) async fn write(&mut self, request: WriteRequest) -> Result<usize> {
self.table_data.metrics.on_write_request_begin();

self.validate_before_write(&request)?;
let mut encode_ctx = EncodeContext::new(request.row_group);

Expand Down Expand Up @@ -423,9 +425,9 @@ impl<'a> Writer<'a> {
encoded_rows: Vec<ByteVec>,
) -> Result<()> {
let sequence = self.write_to_wal(table_data, encoded_rows).await?;
let memserializer = MemTableWriter::make(table_data.clone(), self.serializer);
let memtable_writer = MemTableWriter::make(table_data.clone(), self.serializer);

memserializer
memtable_writer
.write(sequence, &row_group, index_in_writer)
.map_err(|e| {
error!(
Expand Down

0 comments on commit 67543cc

Please sign in to comment.