Skip to content

Commit 57a96d4

Browse files
committed
Add both bytes and items sizes to the persistent metadata
Signed-off-by: Bogdan Drutu <[email protected]>
1 parent 35668a1 commit 57a96d4

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

exporter/exporterhelper/internal/queue/meta.proto

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ enum SizerType {
1111
BYTES = 2;
1212
}
1313

14-
// QueueMetadata holds all persistent metadata for the queue.
15-
message QueueMetadata{
16-
// Sizer type configuration.
17-
SizerType sizer_type = 1;
18-
19-
// Current total size of the queue (in bytes, items, or requests).
20-
sfixed64 queue_size = 2;
14+
// PersistentMetadata holds all persistent metadata for the queue.
15+
// The items and bytes sizes are recorded explicitly, the requests size can be calculated as (write_index - read_index).
16+
message PersistentMetadata{
17+
// Current total items size of the queue.
18+
sfixed64 items_size = 1;
19+
20+
// Current total bytes size of the queue.
21+
sfixed64 bytes_size = 2;
2122

2223
// Index of the next item to be read from the queue.
2324
fixed64 read_index = 3;

0 commit comments

Comments
 (0)