diff --git a/benches/value_log.rs b/benches/value_log.rs index 6fafbad..69775ef 100644 --- a/benches/value_log.rs +++ b/benches/value_log.rs @@ -55,7 +55,7 @@ fn load_value(c: &mut Criterion) { writer.write(key.as_bytes(), &data).unwrap(); } - value_log.register(writer).unwrap(); + value_log.register_writer(writer).unwrap(); for size in sizes { let key = size.to_string(); @@ -105,7 +105,7 @@ fn load_value(c: &mut Criterion) { writer.write(key.as_bytes(), &data).unwrap(); } - value_log.register(writer).unwrap(); + value_log.register_writer(writer).unwrap(); for size in sizes { let key = size.to_string(); @@ -180,7 +180,7 @@ fn compression(c: &mut Criterion) { writer.write(key.as_bytes(), &data).unwrap(); } - value_log.register(writer).unwrap(); + value_log.register_writer(writer).unwrap(); let handle_random = index.get(b"random").unwrap().unwrap(); let handle_good_compression = index.get(b"good_compression").unwrap().unwrap(); diff --git a/src/lib.rs b/src/lib.rs index 07585b9..9f2ff57 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -59,7 +59,7 @@ //! } //! //! // Finish writing -//! value_log.register(writer)?; +//! value_log.register_writer(writer)?; //! //! // Get some stats //! assert_eq!(1.0, value_log.manifest.space_amp()); diff --git a/src/value_log.rs b/src/value_log.rs index 171e17b..7ff2bdd 100644 --- a/src/value_log.rs +++ b/src/value_log.rs @@ -173,7 +173,7 @@ impl ValueLog { /// # Errors /// /// Will return `Err` if an IO error occurs. - pub fn register(&self, writer: SegmentWriter) -> crate::Result<()> { + pub fn register_writer(&self, writer: SegmentWriter) -> crate::Result<()> { self.manifest.register(writer) } diff --git a/tests/basic_gc.rs b/tests/basic_gc.rs index 1c3e0d4..05cd2cb 100644 --- a/tests/basic_gc.rs +++ b/tests/basic_gc.rs @@ -23,7 +23,7 @@ fn basic_gc() -> value_log::Result<()> { writer.write(key.as_bytes(), value)?; } - value_log.register(writer)?; + value_log.register_writer(writer)?; } { @@ -53,7 +53,7 @@ fn basic_gc() -> value_log::Result<()> { writer.write(key.as_bytes(), value)?; } - value_log.register(writer)?; + value_log.register_writer(writer)?; } { diff --git a/tests/basic_kv.rs b/tests/basic_kv.rs index 5044401..927e208 100644 --- a/tests/basic_kv.rs +++ b/tests/basic_kv.rs @@ -24,7 +24,7 @@ fn basic_kv() -> value_log::Result<()> { writer.write(key.as_bytes(), value)?; } - value_log.register(writer)?; + value_log.register_writer(writer)?; } { diff --git a/tests/gc_space_amp.rs b/tests/gc_space_amp.rs index aa7cfcc..ba0e2e4 100644 --- a/tests/gc_space_amp.rs +++ b/tests/gc_space_amp.rs @@ -31,7 +31,7 @@ fn gc_space_amp_target_1() -> value_log::Result<()> { writer.write(key.as_bytes(), value.as_bytes())?; } - value_log.register(writer)?; + value_log.register_writer(writer)?; } value_log.scan_for_stats(index.read().unwrap().values().cloned().map(Ok))?; diff --git a/tests/recovery.rs b/tests/recovery.rs index f63bcdd..1ce5e27 100644 --- a/tests/recovery.rs +++ b/tests/recovery.rs @@ -24,7 +24,7 @@ fn basic_recovery() -> value_log::Result<()> { writer.write(key.as_bytes(), value)?; } - value_log.register(writer)?; + value_log.register_writer(writer)?; } { diff --git a/tests/rollover_index_fail_finish.rs b/tests/rollover_index_fail_finish.rs index bd6cb6a..bdd0eec 100644 --- a/tests/rollover_index_fail_finish.rs +++ b/tests/rollover_index_fail_finish.rs @@ -80,7 +80,7 @@ fn rollover_index_fail_finish() -> value_log::Result<()> { } // NOTE: Should return error because index fails - assert!(value_log.register(writer).is_err()); + assert!(value_log.register_writer(writer).is_err()); } assert_eq!(value_log.manifest.list_segment_ids(), [0]); diff --git a/tests/space_amp.rs b/tests/space_amp.rs index e060c4c..976f106 100644 --- a/tests/space_amp.rs +++ b/tests/space_amp.rs @@ -24,7 +24,7 @@ fn worst_case_space_amp() -> value_log::Result<()> { writer.write(key.as_bytes(), value.as_bytes())?; - value_log.register(writer)?; + value_log.register_writer(writer)?; value_log.scan_for_stats(index.read().unwrap().values().cloned().map(Ok))?; @@ -59,7 +59,7 @@ fn no_overlap_space_amp() -> value_log::Result<()> { let mut writer = value_log.get_writer(index_writer)?; writer.write(key.as_bytes(), value.as_bytes())?; - value_log.register(writer)?; + value_log.register_writer(writer)?; value_log.scan_for_stats(index.read().unwrap().values().cloned().map(Ok))?;