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

jallum / bedrock / b3d7afe336ee9116240479351d7853dd5ed3b645
65%

Build:
DEFAULT BRANCH: develop
Ran 29 Aug 2025 05:36AM UTC
Jobs 1
Files 173
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

29 Aug 2025 05:36AM UTC coverage: 63.351% (+1.2%) from 62.164%
b3d7afe336ee9116240479351d7853dd5ed3b645

push

github

web-flow
#37 - Add range-read support (#39)

The Basalt storage driver isn't really as friendly to range-reads as I'd
like. This is a sketch for a new storage driver, Olivine.

Olivine is a multi-version concurrency control (MVCC) storage driver for
Bedrock that implements a page-based B+ tree-like structure with sliding
window version management over a shard. By using a hybrid tree/page
structure, the aim is to be able to quickly find a page or run of pages
that can be passed efficiently to another process for extraction/loading
from external storage. The tree structure is designed to require minimal
changes during mutation (only when pages split or are appended-to). The
use of an indirection-layer (page map) allows maximum sharing of
structure between versions inexpensively.

This hybrid structure allows Olivine to maintain a _complete_ in-memory
index of the shard _for each version_ in the MVCC window, making
operations like range-clear and range-scan _very_ fast and simple.

## Key Architectural Concepts:

1. Page-Based Storage
- [x] Data is organized into pages (max 256 keys each) that form a
linked chain
- [x] Each page contains sorted keys and their corresponding versions
- [x] Pages are to be encoded as binary data with a 16-byte header for
efficient sharing between processes
- [x] Uses simple median split algorithm when pages exceed capacity for
now

2. Multi-Version Concurrency Control (MVCC)
- [x] Lookaside buffer (ETS table) stores recent key-value pairs for
fast access
- [x] Sliding time window (5-second default) retains multiple versions
in memory
- [x] Version filtering allows point-in-time queries within the window
- [x] Older versions are automatically evicted and persisted to DETS

3. Tree-Based Index
- [x] Interval tree (GB-trees) maps key ranges to page IDs for O(log n)
lookups
- [x] Tree stores {last_key → {page_id, first_key}} mappings
- [x] Supports efficient range queries by walking the tree for page ids

4. Hybrid Memory/Disk Architect... (continued)

602 of 866 new or added lines in 27 files covered. (69.52%)

1 existing line in 1 file now uncovered.

2968 of 4685 relevant lines covered (63.35%)

883.6 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
77.78
77.78% lib/bedrock/data_plane/storage.ex
1
39.29
-1.46% lib/bedrock/data_plane/storage/basalt/server.ex
1
87.5
lib/bedrock/data_plane/storage/olivine/state.ex
1
77.58
-0.15% lib/bedrock/data_plane/transaction.ex
1
96.0
lib/bedrock/internal/range_query.ex
1
94.44
-5.56% lib/bedrock/internal/repo.ex
1
96.67
lib/bedrock/internal/transaction_manager.ex
1
24.68
0.0% lib/bedrock/service/foreman/impl.ex
2
72.73
-3.94% lib/bedrock/cluster/gateway/transaction_builder.ex
2
95.12
lib/bedrock/cluster/gateway/transaction_builder/layout_index.ex
4
20.0
lib/bedrock/data_plane/storage/olivine/page_allocator.ex
6
33.33
lib/bedrock/cluster/gateway/transaction_builder/layout_utils.ex
6
41.18
-22.46% lib/bedrock/internal/gen_server/calls.ex
8
80.95
lib/bedrock/data_plane/storage/olivine/index/tree.ex
9
91.0
lib/bedrock/data_plane/storage/olivine/index/page.ex
11
76.09
-10.71% lib/bedrock/cluster/gateway/transaction_builder/fetching.ex
15
73.21
lib/bedrock/data_plane/storage/olivine/index_manager.ex
19
68.33
lib/bedrock/data_plane/storage/olivine/index_update.ex
20
78.49
lib/bedrock/data_plane/storage/olivine/database.ex
20
63.64
lib/bedrock/data_plane/storage/olivine/index.ex
24
67.57
lib/bedrock/cluster/gateway/transaction_builder/range_fetching.ex
26
58.73
lib/bedrock/data_plane/storage/olivine/server.ex
33
13.16
lib/bedrock/data_plane/storage/olivine/pulling.ex
51
47.42
lib/bedrock/data_plane/storage/olivine/logic.ex

Uncovered Existing Lines

Lines Coverage ∆ File
1
94.64
-2.58% lib/bedrock/cluster/gateway/transaction_builder/tx.ex
Jobs
ID Job ID Ran Files Coverage
1 b3d7afe336ee9116240479351d7853dd5ed3b645.1 29 Aug 2025 05:36AM UTC 173
63.35
GitHub Action Run
Source Files on build b3d7afe336ee9116240479351d7853dd5ed3b645
  • Tree
  • List 173
  • Changed 13
  • Source Changed 0
  • Coverage Changed 13
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • b3d7afe3 on github
  • Prev Build on develop (#4C773138...)
  • Next Build on develop (#7A6B241F...)
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