Skip to content

Commit

Permalink
Fix issue when, under heavy load, pewpew panicswith message "found a …
Browse files Browse the repository at this point in the history
…left over previous bucket"
  • Loading branch information
EliSnow committed May 8, 2020
1 parent 4b615b5 commit d91a422
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pewpew"
version = "0.5.6-beta3"
version = "0.5.6-beta4"
edition = "2018"
default-run = "pewpew"
publish = false
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Bugfix:
- Fix regression introduced in v0.5.5 where specifying a `provider` multiple times in a `provides` would only use the last specified one.
- Fix bug where non-ascii characters could cause an error reading a file when using the `line` (default) `format`.
- Fix bug where the `line` `format` of a file provider would incorrectly parse files with lines longer than 8KB.
- Fix issue when, under heavy load, pewpew panics with message "found a left over previous bucket".

### v0.5.5
Changes:
Expand Down
24 changes: 11 additions & 13 deletions src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ where
i
}
};
self.check_current_bucket();
self.current.append(stat, index);
if let Some(new_tag) = new_tag {
let a = self.write_file_message(&FileMessage::Tags(new_tag));
Expand Down Expand Up @@ -834,16 +833,15 @@ where
}
join_all(futures).then(|_| Ok::<_, TestError>(()))
},
)
.join(print_stats)
.map(|_| TestEndReason::Completed)
.or_else(move |e| test_killer.send(Err(e.clone())).then(move |_| Err(e)))
.select(test_complete.map(|e| *e).map_err(|e| (&*e).clone()))
// .map_err(|e| e.0)
// .and_then(move |(b, _)| stats2.lock().persist(console4()).map(move |_| b))
.then(move |_| {
let mut stats = stats3.lock();
stats.close_out_bucket(true).then(|_| Ok(()))
});
Ok((tx, receiver))
);
let task = print_stats
.join(receiver)
.map(|_| TestEndReason::Completed)
.or_else(move |e| test_killer.send(Err(e.clone())).then(move |_| Err(e)))
.select(test_complete.map(|e| *e).map_err(|e| (&*e).clone()))
.then(move |_| {
let mut stats = stats3.lock();
stats.close_out_bucket(true).then(|_| Ok(()))
});
Ok((tx, task))
}

0 comments on commit d91a422

Please sign in to comment.