Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 9 additions & 17 deletions deps/rabbitmq_stream/src/rabbit_stream_reader.erl
Original file line number Diff line number Diff line change
Expand Up @@ -3571,12 +3571,9 @@ subscription_exists(StreamSubscriptions, SubscriptionId) ->
lists:any(fun(Id) -> Id =:= SubscriptionId end, SubscriptionIds).

send_file_callback(?VERSION_1,
Transport,
_Log,
#consumer{configuration =
#consumer_configuration{socket = S,
subscription_id =
SubscriptionId,
#consumer_configuration{subscription_id = SubId,
counters = Counters}},
Counter) ->
fun(#{chunk_id := FirstOffsetInChunk, num_entries := NumEntries},
Expand All @@ -3587,19 +3584,16 @@ send_file_callback(?VERSION_1,
?REQUEST:1,
?COMMAND_DELIVER:15,
?VERSION_1:16,
SubscriptionId:8/unsigned>>,
Transport:send(S, FrameBeginning),
SubId:8/unsigned>>,
atomics:add(Counter, 1, Size),
increase_messages_consumed(Counters, NumEntries),
set_consumer_offset(Counters, FirstOffsetInChunk)
set_consumer_offset(Counters, FirstOffsetInChunk),
FrameBeginning
end;
send_file_callback(?VERSION_2,
Transport,
Log,
#consumer{configuration =
#consumer_configuration{socket = S,
subscription_id =
SubscriptionId,
#consumer_configuration{subscription_id = SubId,
counters = Counters}},
Counter) ->
fun(#{chunk_id := FirstOffsetInChunk, num_entries := NumEntries},
Expand All @@ -3611,12 +3605,12 @@ send_file_callback(?VERSION_2,
?REQUEST:1,
?COMMAND_DELIVER:15,
?VERSION_2:16,
SubscriptionId:8/unsigned,
SubId:8/unsigned,
CommittedChunkId:64>>,
Transport:send(S, FrameBeginning),
atomics:add(Counter, 1, Size),
increase_messages_consumed(Counters, NumEntries),
set_consumer_offset(Counters, FirstOffsetInChunk)
set_consumer_offset(Counters, FirstOffsetInChunk),
FrameBeginning
end.

send_chunks(DeliverVersion,
Expand Down Expand Up @@ -3686,9 +3680,7 @@ send_chunks(DeliverVersion,
Retry,
Counter) ->
case osiris_log:send_file(Socket, Log,
send_file_callback(DeliverVersion,
Transport,
Log,
send_file_callback(DeliverVersion, Log,
Consumer,
Counter))
of
Expand Down
2 changes: 1 addition & 1 deletion rabbitmq-components.mk
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dep_jose = hex 1.11.10
dep_khepri = hex 0.17.2
dep_khepri_mnesia_migration = hex 0.8.0
dep_meck = hex 1.0.0
dep_osiris = git https://github.com/rabbitmq/osiris v1.9.0
dep_osiris = git https://github.com/rabbitmq/osiris send-file-improvements
dep_prometheus = hex 5.1.1
dep_ra = hex 2.17.1
dep_ranch = hex 2.2.0
Expand Down
Loading