Skip to content

Commit 1c7dbed

Browse files
committed
Merge osiris_log.hrl back into osiris.hrl
1 parent a46c82a commit 1c7dbed

File tree

4 files changed

+19
-20
lines changed

4 files changed

+19
-20
lines changed

src/osiris.hrl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@
4747
-define(FILE_OPTS_WRITE, [raw, binary, write, read]).
4848
-define(INDEX_RECORD_SIZE_B, 29).
4949

50+
%% record chunk_info does not map exactly to an index record (field 'num' differs)
51+
-record(chunk_info,
52+
{id :: osiris:offset(),
53+
timestamp :: non_neg_integer(),
54+
epoch :: osiris:epoch(),
55+
num :: non_neg_integer(),
56+
type :: osiris_log:chunk_type(),
57+
%% size of data + filter + trailer
58+
size :: non_neg_integer(),
59+
%% position in segment file
60+
pos :: integer()
61+
}).
62+
-record(seg_info,
63+
{file :: file:filename_all(),
64+
size = 0 :: non_neg_integer(),
65+
index :: file:filename_all(),
66+
first :: undefined | #chunk_info{},
67+
last :: undefined | #chunk_info{}}).
5068

5169
%% chunk types
5270
-define(CHNK_USER, 0).

src/osiris_log.erl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
-module(osiris_log).
99

1010
-include("src/osiris.hrl").
11-
-include("src/osiris_log.hrl").
1211
-include_lib("kernel/include/file.hrl").
1312

1413
-export([init/1,

src/osiris_log.hrl

Lines changed: 0 additions & 18 deletions
This file was deleted.

src/osiris_log_manifest.erl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-module(osiris_log_manifest).
22

3-
-include("src/osiris_log.hrl").
3+
-include("src/osiris.hrl").
44

55
-type log_kind() :: writer | acceptor | data_reader | offset_reader.
66

0 commit comments

Comments
 (0)