edge-bench --group: a range after a gap starts its batch at the range
a.b.storage's stored 2016 ranges are not contiguous (its 2016 window lies in two article regions); the batch after a gap kept the previous range's end as its start and the harness found no leased range for it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
e135076fcd
commit
91984d3625
2 files changed
+13
No files matched your search
@@ -937,6 +937,15 @@ impl RangeIndexer {
|
||||
self.batch.next = self.end + 1;
|
||||
}
|
||||
|
||||
/// The next range of a group starts after a gap (edge-bench --group, the corpus holding some ranges only): a fresh
|
||||
/// batch starts there, not at the previous range's end; the window carries on. Nothing when the batch has anything.
|
||||
pub fn skip_to(&mut self, article: i64) {
|
||||
if self.batch.headers == 0 && self.batch.releases.is_empty() && self.batch.candidates.is_empty() && self.batch.from < article {
|
||||
self.batch.from = article;
|
||||
self.batch.next = article;
|
||||
}
|
||||
}
|
||||
|
||||
/// Files in the releases finished since the last take (RangeIndexer.pending).
|
||||
pub fn pending(&self) -> usize {
|
||||
self.pending_files
|
||||
|
||||
@@ -292,6 +292,10 @@ fn main() {
|
||||
for (ri, range) in ranges.iter().enumerate() {
|
||||
let range_wall = Instant::now();
|
||||
let headers_before = out.0;
|
||||
// After a gap between stored ranges the batch starts at this range (every range ends with a batch taken).
|
||||
if ri > 0 {
|
||||
indexer.skip_to(range.start);
|
||||
}
|
||||
let mut files: Vec<String> = std::fs::read_dir(&range.dir).unwrap().map(|e| e.unwrap().file_name().into_string().unwrap()).filter(|f| f.ends_with(".gz")).collect();
|
||||
files.sort();
|
||||
for (i, file) in files.iter().enumerate() {
|
||||
|
||||
Reference in new issue
Block a user