Skip to content

Add reader and manifest abstractions for osiris_log #194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 20 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
68877a9
Sketch osiris_log_reader behaviour
the-mikedavis Jul 16, 2025
c6f8c0c
Split out default osiris_log_reader impl
the-mikedavis Jul 16, 2025
ccc07e6
Add osiris_log_manifest behaviour and default impl
the-mikedavis Jul 18, 2025
0cae849
Keep the manifest around in #osiris_log{}
the-mikedavis Jul 24, 2025
2f0cce2
osiris_log_manifest: Add events for segment rollovers & chunk writes
the-mikedavis Jul 24, 2025
b298ad2
osiris_log_manifest: Add delete/1 callback
the-mikedavis Jul 24, 2025
a6c070a
Use application environment instead of keys in the config map
the-mikedavis Jul 28, 2025
4174aff
Expose the manifest type
the-mikedavis Jul 28, 2025
7b476b4
osiris_log_manifest: Add close_manifest/1
the-mikedavis Jul 29, 2025
a46c82a
osiris_log: Include the chunk in chunk_written event
the-mikedavis Jul 30, 2025
1c7dbed
Merge osiris_log.hrl back into osiris.hrl
the-mikedavis Jul 30, 2025
71d7870
osiris_log_manifest: Use #chunk_info{} for chunk_written event
the-mikedavis Aug 1, 2025
79c65f1
osiris_log_reader: Allow updating the reader in pread/sendfile
the-mikedavis Aug 4, 2025
9098f90
wip manifest design v2, close over index files entirely
the-mikedavis Aug 11, 2025
afb054d
Include the more log details in info for convenience
the-mikedavis Aug 11, 2025
d1576f9
osiris_log_reader: Hint for whether you're reading a chunk header
the-mikedavis Aug 12, 2025
f5316e7
fixup! wip manifest design v2, close over index files entirely
the-mikedavis Aug 14, 2025
2da75b6
Include chunk count in seg-info
the-mikedavis Aug 14, 2025
ab810d6
osiris_log_manifest: Make log_info() more specific
the-mikedavis Aug 14, 2025
00384c4
Close over triggering retention eval
the-mikedavis Aug 18, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions src/osiris.hrl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,18 @@
-define(FILE_OPTS_WRITE, [raw, binary, write, read]).
-define(INDEX_RECORD_SIZE_B, 29).

%% record chunk_info does not map exactly to an index record (field 'num' differs)
-record(chunk_info,
{id :: osiris:offset(),
timestamp :: non_neg_integer(),
epoch :: osiris:epoch(),
num :: non_neg_integer(),
type :: osiris_log:chunk_type(),
%% size of data + filter + trailer
size :: non_neg_integer(),
%% position in segment file
pos :: integer()
}).

%% chunk types
-define(CHNK_USER, 0).
Expand Down
Loading