• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

blevesearch / bleve / 28504179486
52%

Build:
DEFAULT BRANCH: master
Ran 01 Jul 2026 08:29AM UTC
Jobs 1
Files 429
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

01 Jul 2026 08:27AM UTC coverage: 52.142% (-0.03%) from 52.171%
28504179486

push

github

web-flow
MB-70770: Do not exclude segments from persistence (#2363)

- In the current batch flush architecture, we employ a fixed number of
persister workers each operating on a fixed number of segments based on
the total size of the batch.
- Current algorithm:

> **Inputs:** $N$ unpersisted segments, $P$ persister workers, $M$ max
bytes per batch.
>   
> **Partition:** Greedily assign segments to $P$ batches such that
$dataSize(batch_i) \leq M$,
> yielding batches with $K_1, K_2, \ldots, K_P$ segments where
$\sum_{i=1}^{P} K_i \leq N$.
>    
> **Merge:** Concurrently merge each batch, producing $P$ merged
segments.
>    
>    **Persist:** Persist the $P$ merged segments; exclude the remaining
>    $N - \sum_{i=1}^{P} K_i$ segments from this persistence round.

- This breaks an invariant as we will persist the index snapshot which
has the VB-SeqMax mapping of the unpersisted segments as well, leading
to data loss if the index is reopened.
- An attempt to fix this issue was done in
https://github.com/blevesearch/bleve/pull/2296, but this was not a
complete fix, as it would completely erase the VB-SeqMax mapping from
the persisted bolt snapshot based on the excluded unpersisted segment's
vbucket, leading to bolt corruption, as we merge batches before
dispatching them to scorch.
- It must be noted that the index snapshot stores the max sequence
number for each vbucket based on the overall set of segment snapshots,
allowing us to have multiple batches contributing to the same vbucket.
- This PR, first off, reverts
https://github.com/blevesearch/bleve/pull/2296.
- Second, we introduce a new algorithm for batch flush.

> **Inputs:** $N$ unpersisted segments, $P$ persister workers, $M$ max
bytes per batch.
>
> **Partition:** Greedily assign all $N$ segments into $Q$ batches such
that $dataSize(batch_i) \leq M$,
> yielding batches with $K_1, K_2, \ldots, K_{Q}$ segments where
$\sum_{i=1}^{Q} K_i = N$
>
> **Merge:** Concurrently merge all $Q$ batches using a semaphore ... (continued)

179 of 223 new or added lines in 6 files covered. (80.27%)

15 existing lines in 3 files now uncovered.

19716 of 37812 relevant lines covered (52.14%)

0.59 hits per line

Uncovered Changes

Lines Coverage ∆ File
28
65.55
-0.68% index/scorch/persister.go
13
80.0
2.01% index/scorch/merge.go
3
90.31
-2.66% index/scorch/introducer.go

Coverage Regressions

Lines Coverage ∆ File
8
90.31
-2.66% index/scorch/introducer.go
4
65.55
-0.68% index/scorch/persister.go
3
80.0
2.01% index/scorch/merge.go
Jobs
ID Job ID Ran Files Coverage
1 28504179486.1 01 Jul 2026 08:29AM UTC 429
52.14
GitHub Action Run
Source Files on build 28504179486
  • Tree
  • List 429
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 38511dcd on github
  • Prev Build on master (#28237808745)
  • Next Build on master (#28597045754)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc