Skip to content

Commit bf2cd3a

Browse files
authored
Fix file writing (#34)
I worked quite hard yesterday on the previous commit and convinced myself of a non-thing. This resulted in there being no logs written to disk. Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
1 parent 286db2b commit bf2cd3a

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "file_gen"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
authors = ["Brian L. Troutwine <brian@troutwine.us>"]
55
edition = "2018"
66
license = "MIT"

src/file.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,10 +197,7 @@ impl Log {
197197
self.rate_limiter.until_n_ready(*nz_bytes).await?;
198198

199199
{
200-
// NOTE we intentionally do not wait on the write to
201-
// complete. The rate_limiter is the sole governor of whether
202-
// writes are attempted, avoiding coordinated omission.
203-
let _ = fp.write(block);
200+
fp.write(block).await?;
204201
counter!("bytes_written", block.len() as u64, &labels);
205202
counter!("lines_written", 1, &labels);
206203

0 commit comments

Comments
 (0)