Skip to content

Commit

Permalink
feat: grpc writing supports TTL hint
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Aug 30, 2024
1 parent a37aeb2 commit 44100f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/operator/src/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use store_api::metric_engine_consts::{
};
use store_api::mito_engine_options::{APPEND_MODE_KEY, MERGE_MODE_KEY};
use store_api::storage::{RegionId, TableId};
use table::requests::InsertRequest as TableInsertRequest;
use table::requests::{InsertRequest as TableInsertRequest, TTL_KEY};
use table::table_reference::TableReference;
use table::TableRef;

Expand Down Expand Up @@ -659,6 +659,9 @@ impl Inserter {
if let Some(merge_mode) = ctx.extension(MERGE_MODE_KEY) {
hint_options.push((MERGE_MODE_KEY, merge_mode));
}
if let Some(ttl) = ctx.extension(TTL_KEY) {
hint_options.push((TTL_KEY, ttl));
}
hint_options.as_slice()
}
// Set append_mode to true for log table.
Expand Down

0 comments on commit 44100f4

Please sign in to comment.