Skip to content

Commit

Permalink
Load checkpoint lazily in sources (#4913)
Browse files Browse the repository at this point in the history
  • Loading branch information
guilload authored May 6, 2024
1 parent 90e0b0d commit 93cf7f3
Show file tree
Hide file tree
Showing 18 changed files with 735 additions and 784 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ services:
- "${MAP_HOST_PULSAR:-127.0.0.1}:6650:6650"
- "${MAP_HOST_PULSAR:-127.0.0.1}:8081:8080"
environment:
PULSAR_MEM: "-Xms256M -Xmx256M"
PULSAR_MEM: "-Xms384M -Xmx384M"
profiles:
- all
- pulsar
Expand Down
32 changes: 16 additions & 16 deletions quickwit/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 8 additions & 6 deletions quickwit/quickwit-common/src/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ use rand::Rng;
/// Appends a random suffix composed of a hyphen and five random alphanumeric characters.
pub fn append_random_suffix(string: &str) -> String {
let rng = rand::thread_rng();
let slug: String = rng
.sample_iter(&Alphanumeric)
.take(5)
.map(char::from)
.collect();
format!("{string}-{slug}")
let mut randomized_string = String::with_capacity(string.len() + 6);
randomized_string.push_str(string);
randomized_string.push('-');

for random_byte in rng.sample_iter(&Alphanumeric).take(5) {
randomized_string.push(char::from(random_byte));
}
randomized_string
}

#[cfg(test)]
Expand Down
Loading

0 comments on commit 93cf7f3

Please sign in to comment.