Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
marvin-j97 committed Jun 11, 2024
1 parent 784cea8 commit 6c7789e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions benches/value_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand Down
2 changes: 1 addition & 1 deletion src/value_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl ValueLog {
/// # Errors
///
/// Will return `Err` if an IO error occurs.
pub fn register<W: IndexWriter>(&self, writer: SegmentWriter<W>) -> crate::Result<()> {
pub fn register_writer<W: IndexWriter>(&self, writer: SegmentWriter<W>) -> crate::Result<()> {
self.manifest.register(writer)
}

Expand Down
4 changes: 2 additions & 2 deletions tests/basic_gc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
}

{
Expand Down Expand Up @@ -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)?;
}

{
Expand Down
2 changes: 1 addition & 1 deletion tests/basic_kv.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
}

{
Expand Down
2 changes: 1 addition & 1 deletion tests/gc_space_amp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))?;
Expand Down
2 changes: 1 addition & 1 deletion tests/recovery.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
}

{
Expand Down
2 changes: 1 addition & 1 deletion tests/rollover_index_fail_finish.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
4 changes: 2 additions & 2 deletions tests/space_amp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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))?;

Expand Down Expand Up @@ -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))?;

Expand Down

0 comments on commit 6c7789e

Please sign in to comment.