Skip to content

Commit 10c5ca5

Browse files
committed
fix bad name
1 parent bf8fbc9 commit 10c5ca5

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

src/wal/src/dummy.rs

-6
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,10 @@ pub struct DoNothing;
2828

2929
#[async_trait]
3030
impl WalManager for DoNothing {
31-
/// Get current sequence number.
3231
async fn sequence_num(&self, _location: WalLocation) -> Result<SequenceNumber> {
3332
Ok(0)
3433
}
3534

36-
/// Mark the entries whose sequence number is in [0, `sequence_number`] to
37-
/// be deleted in the future.
3835
async fn mark_delete_entries_up_to(
3936
&self,
4037
_location: WalLocation,
@@ -43,17 +40,14 @@ impl WalManager for DoNothing {
4340
Ok(())
4441
}
4542

46-
/// Close a region.
4743
async fn close_region(&self, _region: RegionId) -> Result<()> {
4844
Ok(())
4945
}
5046

51-
/// Close the wal gracefully.
5247
async fn close_gracefully(&self) -> Result<()> {
5348
Ok(())
5449
}
5550

56-
/// Provide iterator on necessary entries according to `ReadRequest`.
5751
async fn read_batch(
5852
&self,
5953
_ctx: &ReadContext,

src/wal/src/rocksdb_impl/manager.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -971,12 +971,12 @@ impl fmt::Debug for RocksImpl {
971971
pub struct RocksDBWalsOpener;
972972

973973
impl RocksDBWalsOpener {
974-
fn build_rocks_impl(
974+
fn build_manager(
975975
wal_path: PathBuf,
976976
runtime: Arc<Runtime>,
977977
config: RocksDBConfig,
978978
) -> Result<WalManagerRef> {
979-
let data_wal = Builder::new(wal_path, runtime)
979+
let rocks = Builder::new(wal_path, runtime)
980980
.max_subcompactions(config.max_subcompactions)
981981
.max_background_jobs(config.max_background_jobs)
982982
.enable_statistics(config.enable_statistics)
@@ -988,7 +988,7 @@ impl RocksDBWalsOpener {
988988
.fifo_compaction_max_table_files_size(config.fifo_compaction_max_table_files_size.0)
989989
.build()?;
990990

991-
Ok(Arc::new(data_wal))
991+
Ok(Arc::new(rocks))
992992
}
993993
}
994994

@@ -1012,19 +1012,19 @@ impl WalsOpener for RocksDBWalsOpener {
10121012

10131013
// Build data wal
10141014
let data_wal = if rocksdb_wal_config.disable_data {
1015-
Arc::new(crate::dummy::DoNothing) as Arc<_>
1015+
Arc::new(crate::dummy::DoNothing)
10161016
} else {
1017-
Self::build_rocks_impl(
1017+
Self::build_manager(
10181018
data_path.join(WAL_DIR_NAME),
10191019
write_runtime.clone(),
10201020
rocksdb_wal_config.data_namespace,
10211021
)?
10221022
};
10231023

10241024
// Build manifest wal
1025-
let manifest_wal = Self::build_rocks_impl(
1025+
let manifest_wal = Self::build_manager(
10261026
data_path.join(MANIFEST_DIR_NAME),
1027-
write_runtime.clone(),
1027+
write_runtime,
10281028
rocksdb_wal_config.meta_namespace,
10291029
)?;
10301030

0 commit comments

Comments
 (0)