mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-20 06:50:37 +00:00
fix: fix typo (#1649)
This commit is contained in:
@@ -56,13 +56,13 @@ async fn test_close_region_handler() {
|
||||
engine_manager_ref,
|
||||
catalog_manager_ref,
|
||||
..
|
||||
} = parepare_handler_test("test_close_region_handler").await;
|
||||
} = prepare_handler_test("test_close_region_handler").await;
|
||||
|
||||
let executor = Arc::new(HandlerGroupExecutor::new(vec![Arc::new(
|
||||
CloseRegionHandler::new(catalog_manager_ref.clone(), engine_manager_ref.clone()),
|
||||
)]));
|
||||
|
||||
parepare_table(instance.inner()).await;
|
||||
prepare_table(instance.inner()).await;
|
||||
|
||||
// Closes demo table
|
||||
handle_instruction(
|
||||
@@ -121,7 +121,7 @@ async fn test_open_region_handler() {
|
||||
engine_manager_ref,
|
||||
catalog_manager_ref,
|
||||
..
|
||||
} = parepare_handler_test("test_open_region_handler").await;
|
||||
} = prepare_handler_test("test_open_region_handler").await;
|
||||
|
||||
let executor = Arc::new(HandlerGroupExecutor::new(vec![
|
||||
Arc::new(OpenRegionHandler::new(
|
||||
@@ -134,7 +134,7 @@ async fn test_open_region_handler() {
|
||||
)),
|
||||
]));
|
||||
|
||||
parepare_table(instance.inner()).await;
|
||||
prepare_table(instance.inner()).await;
|
||||
|
||||
// Opens a opened table
|
||||
handle_instruction(executor.clone(), mailbox.clone(), open_region_instruction());
|
||||
@@ -188,7 +188,7 @@ async fn test_open_region_handler() {
|
||||
assert_test_table_found(instance.inner()).await;
|
||||
}
|
||||
|
||||
async fn parepare_handler_test(name: &str) -> HandlerTestGuard {
|
||||
async fn prepare_handler_test(name: &str) -> HandlerTestGuard {
|
||||
let mock_instance = MockInstance::new(name).await;
|
||||
let instance = mock_instance.inner();
|
||||
let engine_manager = instance.sql_handler().table_engine_manager().clone();
|
||||
@@ -252,7 +252,7 @@ fn open_region_instruction() -> Instruction {
|
||||
})
|
||||
}
|
||||
|
||||
async fn parepare_table(instance: &Instance) {
|
||||
async fn prepare_table(instance: &Instance) {
|
||||
test_util::create_test_table(instance, ConcreteDataType::timestamp_millisecond_datatype())
|
||||
.await
|
||||
.unwrap();
|
||||
|
||||
@@ -23,7 +23,7 @@ use common_telemetry::error;
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct InvalidateTableCacheHandler {
|
||||
backend_cache_invalidtor: KvCacheInvalidatorRef,
|
||||
backend_cache_invalidator: KvCacheInvalidatorRef,
|
||||
}
|
||||
|
||||
impl HeartbeatResponseHandler for InvalidateTableCacheHandler {
|
||||
@@ -71,9 +71,9 @@ impl HeartbeatResponseHandler for InvalidateTableCacheHandler {
|
||||
}
|
||||
|
||||
impl InvalidateTableCacheHandler {
|
||||
pub fn new(backend_cache_invalidtor: KvCacheInvalidatorRef) -> Self {
|
||||
pub fn new(backend_cache_invalidator: KvCacheInvalidatorRef) -> Self {
|
||||
Self {
|
||||
backend_cache_invalidtor,
|
||||
backend_cache_invalidator,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -87,6 +87,6 @@ impl InvalidateTableCacheHandler {
|
||||
|
||||
let tg_key = tg_key.as_bytes();
|
||||
|
||||
self.backend_cache_invalidtor.invalidate_key(tg_key).await;
|
||||
self.backend_cache_invalidator.invalidate_key(tg_key).await;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,12 +28,12 @@ use tokio::sync::mpsc;
|
||||
|
||||
use super::invalidate_table_cache::InvalidateTableCacheHandler;
|
||||
|
||||
pub struct MockKvCacheInvalidtor {
|
||||
pub struct MockKvCacheInvalidator {
|
||||
inner: Mutex<HashMap<Vec<u8>, i32>>,
|
||||
}
|
||||
|
||||
#[async_trait::async_trait]
|
||||
impl KvCacheInvalidator for MockKvCacheInvalidtor {
|
||||
impl KvCacheInvalidator for MockKvCacheInvalidator {
|
||||
async fn invalidate_key(&self, key: &[u8]) {
|
||||
self.inner.lock().unwrap().remove(key);
|
||||
}
|
||||
@@ -48,7 +48,7 @@ async fn test_invalidate_table_cache_handler() {
|
||||
};
|
||||
|
||||
let inner = HashMap::from([(table_key.to_string().as_bytes().to_vec(), 1)]);
|
||||
let backend = Arc::new(MockKvCacheInvalidtor {
|
||||
let backend = Arc::new(MockKvCacheInvalidator {
|
||||
inner: Mutex::new(inner),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user