From 3df5c778dbbf431bb0dd0a43978712e060e11d97 Mon Sep 17 00:00:00 2001 From: zwang28 <84491488@qq.com> Date: Fri, 16 Dec 2022 18:16:18 +0800 Subject: [PATCH] fix tests --- dashboard/proto/gen/batch_plan.ts | 14 +++--- dashboard/proto/gen/common.ts | 49 +++++++++++++++++++ dashboard/proto/gen/task_service.ts | 26 +++++----- src/batch/src/executor/insert.rs | 1 + src/batch/src/executor/mod.rs | 4 +- src/batch/src/task/task_manager.rs | 8 +-- src/compute/tests/integration_tests.rs | 10 ++-- src/storage/hummock_sdk/src/lib.rs | 2 +- .../benches/bench_hummock_iter.rs | 1 + .../hummock_test/src/compactor_tests.rs | 6 +++ .../hummock_test/src/failpoint_tests.rs | 6 +++ .../hummock_test/src/hummock_storage_tests.rs | 34 +++++++++++++ .../hummock_test/src/snapshot_tests.rs | 2 + .../hummock_test/src/state_store_tests.rs | 32 ++++++++++++ .../hummock_test/src/sync_point_tests.rs | 1 + 15 files changed, 167 insertions(+), 29 deletions(-) diff --git a/dashboard/proto/gen/batch_plan.ts b/dashboard/proto/gen/batch_plan.ts index 56436c2b71b6d..3f8a4e3413929 100644 --- a/dashboard/proto/gen/batch_plan.ts +++ b/dashboard/proto/gen/batch_plan.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import { SourceInfo } from "./catalog"; -import { Buffer, HostAddress, WorkerNode } from "./common"; +import { BatchQueryEpoch, Buffer, HostAddress, WorkerNode } from "./common"; import { IntervalUnit } from "./data"; import { AggCall, ExprNode, InputRefExpr, ProjectSetSelectItem, TableFunction } from "./expr"; import { @@ -221,7 +221,7 @@ export interface TaskOutputId { export interface LocalExecutePlan { plan: PlanFragment | undefined; - epoch: number; + epoch: BatchQueryEpoch | undefined; } /** ExchangeSource describes where to read results from children operators */ @@ -1431,21 +1431,21 @@ export const TaskOutputId = { }; function createBaseLocalExecutePlan(): LocalExecutePlan { - return { plan: undefined, epoch: 0 }; + return { plan: undefined, epoch: undefined }; } export const LocalExecutePlan = { fromJSON(object: any): LocalExecutePlan { return { plan: isSet(object.plan) ? PlanFragment.fromJSON(object.plan) : undefined, - epoch: isSet(object.epoch) ? Number(object.epoch) : 0, + epoch: isSet(object.epoch) ? BatchQueryEpoch.fromJSON(object.epoch) : undefined, }; }, toJSON(message: LocalExecutePlan): unknown { const obj: any = {}; message.plan !== undefined && (obj.plan = message.plan ? PlanFragment.toJSON(message.plan) : undefined); - message.epoch !== undefined && (obj.epoch = Math.round(message.epoch)); + message.epoch !== undefined && (obj.epoch = message.epoch ? BatchQueryEpoch.toJSON(message.epoch) : undefined); return obj; }, @@ -1454,7 +1454,9 @@ export const LocalExecutePlan = { message.plan = (object.plan !== undefined && object.plan !== null) ? PlanFragment.fromPartial(object.plan) : undefined; - message.epoch = object.epoch ?? 0; + message.epoch = (object.epoch !== undefined && object.epoch !== null) + ? BatchQueryEpoch.fromPartial(object.epoch) + : undefined; return message; }, }; diff --git a/dashboard/proto/gen/common.ts b/dashboard/proto/gen/common.ts index c4d081800507d..1042efe39a81a 100644 --- a/dashboard/proto/gen/common.ts +++ b/dashboard/proto/gen/common.ts @@ -213,6 +213,13 @@ export interface ParallelUnitMapping { data: number[]; } +export interface BatchQueryEpoch { + epoch?: { $case: "committed"; committed: number } | { $case: "current"; current: number } | { + $case: "backup"; + backup: number; + }; +} + function createBaseStatus(): Status { return { code: Status_Code.UNSPECIFIED, message: "" }; } @@ -438,6 +445,48 @@ export const ParallelUnitMapping = { }, }; +function createBaseBatchQueryEpoch(): BatchQueryEpoch { + return { epoch: undefined }; +} + +export const BatchQueryEpoch = { + fromJSON(object: any): BatchQueryEpoch { + return { + epoch: isSet(object.committed) + ? { $case: "committed", committed: Number(object.committed) } + : isSet(object.current) + ? { $case: "current", current: Number(object.current) } + : isSet(object.backup) + ? { $case: "backup", backup: Number(object.backup) } + : undefined, + }; + }, + + toJSON(message: BatchQueryEpoch): unknown { + const obj: any = {}; + message.epoch?.$case === "committed" && (obj.committed = Math.round(message.epoch?.committed)); + message.epoch?.$case === "current" && (obj.current = Math.round(message.epoch?.current)); + message.epoch?.$case === "backup" && (obj.backup = Math.round(message.epoch?.backup)); + return obj; + }, + + fromPartial, I>>(object: I): BatchQueryEpoch { + const message = createBaseBatchQueryEpoch(); + if ( + object.epoch?.$case === "committed" && object.epoch?.committed !== undefined && object.epoch?.committed !== null + ) { + message.epoch = { $case: "committed", committed: object.epoch.committed }; + } + if (object.epoch?.$case === "current" && object.epoch?.current !== undefined && object.epoch?.current !== null) { + message.epoch = { $case: "current", current: object.epoch.current }; + } + if (object.epoch?.$case === "backup" && object.epoch?.backup !== undefined && object.epoch?.backup !== null) { + message.epoch = { $case: "backup", backup: object.epoch.backup }; + } + return message; + }, +}; + declare var self: any | undefined; declare var window: any | undefined; declare var global: any | undefined; diff --git a/dashboard/proto/gen/task_service.ts b/dashboard/proto/gen/task_service.ts index 70d84a1d90b62..8446c702d48b5 100644 --- a/dashboard/proto/gen/task_service.ts +++ b/dashboard/proto/gen/task_service.ts @@ -1,6 +1,6 @@ /* eslint-disable */ import { PlanFragment, TaskId as TaskId1, TaskOutputId } from "./batch_plan"; -import { Status } from "./common"; +import { BatchQueryEpoch, Status } from "./common"; import { DataChunk } from "./data"; import { StreamMessage } from "./stream_plan"; @@ -81,7 +81,7 @@ export function taskInfo_TaskStatusToJSON(object: TaskInfo_TaskStatus): string { export interface CreateTaskRequest { taskId: TaskId1 | undefined; plan: PlanFragment | undefined; - epoch: number; + epoch: BatchQueryEpoch | undefined; } export interface AbortTaskRequest { @@ -109,7 +109,7 @@ export interface GetDataResponse { export interface ExecuteRequest { taskId: TaskId1 | undefined; plan: PlanFragment | undefined; - epoch: number; + epoch: BatchQueryEpoch | undefined; } export interface GetDataRequest { @@ -206,7 +206,7 @@ export const TaskInfo = { }; function createBaseCreateTaskRequest(): CreateTaskRequest { - return { taskId: undefined, plan: undefined, epoch: 0 }; + return { taskId: undefined, plan: undefined, epoch: undefined }; } export const CreateTaskRequest = { @@ -214,7 +214,7 @@ export const CreateTaskRequest = { return { taskId: isSet(object.taskId) ? TaskId1.fromJSON(object.taskId) : undefined, plan: isSet(object.plan) ? PlanFragment.fromJSON(object.plan) : undefined, - epoch: isSet(object.epoch) ? Number(object.epoch) : 0, + epoch: isSet(object.epoch) ? BatchQueryEpoch.fromJSON(object.epoch) : undefined, }; }, @@ -222,7 +222,7 @@ export const CreateTaskRequest = { const obj: any = {}; message.taskId !== undefined && (obj.taskId = message.taskId ? TaskId1.toJSON(message.taskId) : undefined); message.plan !== undefined && (obj.plan = message.plan ? PlanFragment.toJSON(message.plan) : undefined); - message.epoch !== undefined && (obj.epoch = Math.round(message.epoch)); + message.epoch !== undefined && (obj.epoch = message.epoch ? BatchQueryEpoch.toJSON(message.epoch) : undefined); return obj; }, @@ -234,7 +234,9 @@ export const CreateTaskRequest = { message.plan = (object.plan !== undefined && object.plan !== null) ? PlanFragment.fromPartial(object.plan) : undefined; - message.epoch = object.epoch ?? 0; + message.epoch = (object.epoch !== undefined && object.epoch !== null) + ? BatchQueryEpoch.fromPartial(object.epoch) + : undefined; return message; }, }; @@ -375,7 +377,7 @@ export const GetDataResponse = { }; function createBaseExecuteRequest(): ExecuteRequest { - return { taskId: undefined, plan: undefined, epoch: 0 }; + return { taskId: undefined, plan: undefined, epoch: undefined }; } export const ExecuteRequest = { @@ -383,7 +385,7 @@ export const ExecuteRequest = { return { taskId: isSet(object.taskId) ? TaskId1.fromJSON(object.taskId) : undefined, plan: isSet(object.plan) ? PlanFragment.fromJSON(object.plan) : undefined, - epoch: isSet(object.epoch) ? Number(object.epoch) : 0, + epoch: isSet(object.epoch) ? BatchQueryEpoch.fromJSON(object.epoch) : undefined, }; }, @@ -391,7 +393,7 @@ export const ExecuteRequest = { const obj: any = {}; message.taskId !== undefined && (obj.taskId = message.taskId ? TaskId1.toJSON(message.taskId) : undefined); message.plan !== undefined && (obj.plan = message.plan ? PlanFragment.toJSON(message.plan) : undefined); - message.epoch !== undefined && (obj.epoch = Math.round(message.epoch)); + message.epoch !== undefined && (obj.epoch = message.epoch ? BatchQueryEpoch.toJSON(message.epoch) : undefined); return obj; }, @@ -403,7 +405,9 @@ export const ExecuteRequest = { message.plan = (object.plan !== undefined && object.plan !== null) ? PlanFragment.fromPartial(object.plan) : undefined; - message.epoch = object.epoch ?? 0; + message.epoch = (object.epoch !== undefined && object.epoch !== null) + ? BatchQueryEpoch.fromPartial(object.epoch) + : undefined; return message; }, }; diff --git a/src/batch/src/executor/insert.rs b/src/batch/src/executor/insert.rs index aee76a2281b47..49bd4ed4ceb18 100644 --- a/src/batch/src/executor/insert.rs +++ b/src/batch/src/executor/insert.rs @@ -312,6 +312,7 @@ mod tests { ignore_range_tombstone: false, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await?; diff --git a/src/batch/src/executor/mod.rs b/src/batch/src/executor/mod.rs index 35394d01831a9..da35ad8e9d4a6 100644 --- a/src/batch/src/executor/mod.rs +++ b/src/batch/src/executor/mod.rs @@ -229,7 +229,7 @@ impl<'a, C: BatchTaskContext> ExecutorBuilder<'a, C> { #[cfg(test)] mod tests { - use risingwave_hummock_sdk::to_commited_batch_query_epoch; + use risingwave_hummock_sdk::to_committed_batch_query_epoch; use risingwave_pb::batch_plan::PlanNode; use crate::executor::ExecutorBuilder; @@ -249,7 +249,7 @@ mod tests { &plan_node, task_id, ComputeNodeContext::for_test(), - to_commited_batch_query_epoch(u64::MAX), + to_committed_batch_query_epoch(u64::MAX), ); let child_plan = &PlanNode { ..Default::default() diff --git a/src/batch/src/task/task_manager.rs b/src/batch/src/task/task_manager.rs index 8a19023e53764..b10a15a286daf 100644 --- a/src/batch/src/task/task_manager.rs +++ b/src/batch/src/task/task_manager.rs @@ -215,7 +215,7 @@ mod tests { use risingwave_common::config::BatchConfig; use risingwave_common::types::DataType; use risingwave_expr::expr::make_i32_literal; - use risingwave_hummock_sdk::to_commited_batch_query_epoch; + use risingwave_hummock_sdk::to_committed_batch_query_epoch; use risingwave_pb::batch_plan::exchange_info::DistributionMode; use risingwave_pb::batch_plan::plan_node::NodeBody; use risingwave_pb::batch_plan::{ @@ -284,13 +284,13 @@ mod tests { .fire_task( &task_id, plan.clone(), - to_commited_batch_query_epoch(0), + to_committed_batch_query_epoch(0), context.clone(), ) .await .unwrap(); let err = manager - .fire_task(&task_id, plan, to_commited_batch_query_epoch(0), context) + .fire_task(&task_id, plan, to_committed_batch_query_epoch(0), context) .await .unwrap_err(); assert!(err @@ -334,7 +334,7 @@ mod tests { .fire_task( &task_id, plan.clone(), - to_commited_batch_query_epoch(0), + to_committed_batch_query_epoch(0), context.clone(), ) .await diff --git a/src/compute/tests/integration_tests.rs b/src/compute/tests/integration_tests.rs index 9eb196a792cf7..ce86a6c981005 100644 --- a/src/compute/tests/integration_tests.rs +++ b/src/compute/tests/integration_tests.rs @@ -35,7 +35,7 @@ use risingwave_common::test_prelude::DataChunkTestExt; use risingwave_common::types::{DataType, IntoOrdered}; use risingwave_common::util::epoch::EpochPair; use risingwave_common::util::sort_util::{OrderPair, OrderType}; -use risingwave_hummock_sdk::to_commited_batch_query_epoch; +use risingwave_hummock_sdk::to_committed_batch_query_epoch; use risingwave_source::table_test_utils::create_table_source_desc_builder; use risingwave_source::{TableSourceManager, TableSourceManagerRef}; use risingwave_storage::memory::MemoryStateStore; @@ -221,7 +221,7 @@ async fn test_table_materialize() -> StreamResult<()> { let scan = Box::new(RowSeqScanExecutor::new( table.clone(), vec![ScanRange::full()], - to_commited_batch_query_epoch(u64::MAX), + to_committed_batch_query_epoch(u64::MAX), 1024, "RowSeqExecutor2".to_string(), None, @@ -283,7 +283,7 @@ async fn test_table_materialize() -> StreamResult<()> { let scan = Box::new(RowSeqScanExecutor::new( table.clone(), vec![ScanRange::full()], - to_commited_batch_query_epoch(u64::MAX), + to_committed_batch_query_epoch(u64::MAX), 1024, "RowSeqScanExecutor2".to_string(), None, @@ -355,7 +355,7 @@ async fn test_table_materialize() -> StreamResult<()> { let scan = Box::new(RowSeqScanExecutor::new( table, vec![ScanRange::full()], - to_commited_batch_query_epoch(u64::MAX), + to_committed_batch_query_epoch(u64::MAX), 1024, "RowSeqScanExecutor2".to_string(), None, @@ -422,7 +422,7 @@ async fn test_row_seq_scan() -> Result<()> { let executor = Box::new(RowSeqScanExecutor::new( table, vec![ScanRange::full()], - to_commited_batch_query_epoch(u64::MAX), + to_committed_batch_query_epoch(u64::MAX), 1, "RowSeqScanExecutor2".to_string(), None, diff --git a/src/storage/hummock_sdk/src/lib.rs b/src/storage/hummock_sdk/src/lib.rs index 0a6a9cdafd167..0ffaf679821e0 100644 --- a/src/storage/hummock_sdk/src/lib.rs +++ b/src/storage/hummock_sdk/src/lib.rs @@ -183,7 +183,7 @@ impl From for HummockReadEpoch { } } -pub fn to_commited_batch_query_epoch(epoch: u64) -> BatchQueryEpoch { +pub fn to_committed_batch_query_epoch(epoch: u64) -> BatchQueryEpoch { BatchQueryEpoch { epoch: Some(batch_query_epoch::Epoch::Committed(epoch)), } diff --git a/src/storage/hummock_test/benches/bench_hummock_iter.rs b/src/storage/hummock_test/benches/bench_hummock_iter.rs index e02b7aed36fe6..102cc20025b29 100644 --- a/src/storage/hummock_test/benches/bench_hummock_iter.rs +++ b/src/storage/hummock_test/benches/bench_hummock_iter.rs @@ -100,6 +100,7 @@ fn criterion_benchmark(c: &mut Criterion) { check_bloom_filter: false, retention_seconds: None, table_id: Default::default(), + read_version_from_backup: false, }, )) .unwrap(); diff --git a/src/storage/hummock_test/src/compactor_tests.rs b/src/storage/hummock_test/src/compactor_tests.rs index b19751779b3c7..8c040614c9c0f 100644 --- a/src/storage/hummock_test/src/compactor_tests.rs +++ b/src/storage/hummock_test/src/compactor_tests.rs @@ -302,6 +302,7 @@ pub(crate) mod tests { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -320,6 +321,7 @@ pub(crate) mod tests { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await; @@ -431,6 +433,7 @@ pub(crate) mod tests { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -783,6 +786,7 @@ pub(crate) mod tests { prefix_hint: None, table_id: TableId::from(existing_table_ids), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -955,6 +959,7 @@ pub(crate) mod tests { prefix_hint: None, table_id: TableId::from(existing_table_id), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -1128,6 +1133,7 @@ pub(crate) mod tests { prefix_hint: Some(bloom_filter_key), table_id: TableId::from(existing_table_id), retention_seconds: None, + read_version_from_backup: false, }, ) .await diff --git a/src/storage/hummock_test/src/failpoint_tests.rs b/src/storage/hummock_test/src/failpoint_tests.rs index ea065df09d3c3..7b6766dacd461 100644 --- a/src/storage/hummock_test/src/failpoint_tests.rs +++ b/src/storage/hummock_test/src/failpoint_tests.rs @@ -91,6 +91,7 @@ async fn test_failpoints_state_store_read_upload() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -136,6 +137,7 @@ async fn test_failpoints_state_store_read_upload() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await; @@ -150,6 +152,7 @@ async fn test_failpoints_state_store_read_upload() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await; @@ -165,6 +168,7 @@ async fn test_failpoints_state_store_read_upload() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -199,6 +203,7 @@ async fn test_failpoints_state_store_read_upload() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -215,6 +220,7 @@ async fn test_failpoints_state_store_read_upload() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await diff --git a/src/storage/hummock_test/src/hummock_storage_tests.rs b/src/storage/hummock_test/src/hummock_storage_tests.rs index 671ff5cf4705d..b6f3292fd8844 100644 --- a/src/storage/hummock_test/src/hummock_storage_tests.rs +++ b/src/storage/hummock_test/src/hummock_storage_tests.rs @@ -229,6 +229,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -245,6 +246,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -263,6 +265,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -293,6 +296,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -325,6 +329,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -342,6 +347,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -359,6 +365,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -391,6 +398,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -409,6 +417,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -426,6 +435,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -465,6 +475,7 @@ async fn test_storage_basic() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -631,6 +642,7 @@ async fn test_state_store_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -674,6 +686,7 @@ async fn test_state_store_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -695,6 +708,7 @@ async fn test_state_store_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -734,6 +748,7 @@ async fn test_state_store_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -855,6 +870,7 @@ async fn test_delete_get() { check_bloom_filter: true, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -965,6 +981,7 @@ async fn test_multiple_epoch_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -982,6 +999,7 @@ async fn test_multiple_epoch_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -998,6 +1016,7 @@ async fn test_multiple_epoch_sync() { retention_seconds: None, check_bloom_filter: false, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1132,6 +1151,7 @@ async fn test_iter_with_min_epoch() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1154,6 +1174,7 @@ async fn test_iter_with_min_epoch() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1174,6 +1195,7 @@ async fn test_iter_with_min_epoch() { retention_seconds: Some(1), check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1213,6 +1235,7 @@ async fn test_iter_with_min_epoch() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1235,6 +1258,7 @@ async fn test_iter_with_min_epoch() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1257,6 +1281,7 @@ async fn test_iter_with_min_epoch() { retention_seconds: Some(1), check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, ) .await @@ -1407,6 +1432,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1436,6 +1462,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1465,6 +1492,7 @@ async fn test_hummock_version_reader() { retention_seconds: Some(1), check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1532,6 +1560,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1570,6 +1599,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1608,6 +1638,7 @@ async fn test_hummock_version_reader() { retention_seconds: Some(1), check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1646,6 +1677,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1690,6 +1722,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) @@ -1728,6 +1761,7 @@ async fn test_hummock_version_reader() { retention_seconds: None, check_bloom_filter: true, prefix_hint: None, + read_version_from_backup: false, }, read_snapshot, ) diff --git a/src/storage/hummock_test/src/snapshot_tests.rs b/src/storage/hummock_test/src/snapshot_tests.rs index bec858d2c284a..551cd5cdb09dd 100644 --- a/src/storage/hummock_test/src/snapshot_tests.rs +++ b/src/storage/hummock_test/src/snapshot_tests.rs @@ -52,6 +52,7 @@ macro_rules! assert_count_range_scan { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -85,6 +86,7 @@ macro_rules! assert_count_backward_range_scan { epoch: $epoch, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await diff --git a/src/storage/hummock_test/src/state_store_tests.rs b/src/storage/hummock_test/src/state_store_tests.rs index 4e08c91f5cd1c..9485e9828edb5 100644 --- a/src/storage/hummock_test/src/state_store_tests.rs +++ b/src/storage/hummock_test/src/state_store_tests.rs @@ -125,6 +125,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -141,6 +142,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -159,6 +161,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -190,6 +193,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -222,6 +226,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -239,6 +244,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -256,6 +262,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -274,6 +281,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -292,6 +300,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -309,6 +318,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -327,6 +337,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -353,6 +364,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -369,6 +381,7 @@ async fn test_basic_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -571,6 +584,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -589,6 +603,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -620,6 +635,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -638,6 +654,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -656,6 +673,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -674,6 +692,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -691,6 +710,7 @@ async fn test_reload_storage() { prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -735,6 +755,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -753,6 +774,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -771,6 +793,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -791,6 +814,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -856,6 +880,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -872,6 +897,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -889,6 +915,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -908,6 +935,7 @@ async fn test_write_anytime_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, }, ) .await @@ -1062,6 +1090,7 @@ async fn test_delete_get_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -1147,6 +1176,7 @@ async fn test_multiple_epoch_sync_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -1164,6 +1194,7 @@ async fn test_multiple_epoch_sync_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await @@ -1180,6 +1211,7 @@ async fn test_multiple_epoch_sync_inner( prefix_hint: None, table_id: Default::default(), retention_seconds: None, + read_version_from_backup: false, } ) .await diff --git a/src/storage/hummock_test/src/sync_point_tests.rs b/src/storage/hummock_test/src/sync_point_tests.rs index fb7a2e85e0101..f5336d475bd76 100644 --- a/src/storage/hummock_test/src/sync_point_tests.rs +++ b/src/storage/hummock_test/src/sync_point_tests.rs @@ -334,6 +334,7 @@ async fn test_syncpoints_get_in_delete_range_boundary() { prefix_hint: None, table_id: TableId::from(existing_table_id), retention_seconds: None, + read_version_from_backup: false, }; let get_result = storage .get(b"hhh", 120, read_options.clone())