Skip to content

Commit

Permalink
Create stream before appending to it.
Browse files Browse the repository at this point in the history
This should handle the case where we append more than 1 batch of events to a new stream.

Should fix commanded#283
  • Loading branch information
thomasdziedzic committed Mar 24, 2024
1 parent 5e17ea1 commit 3a4638e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/event_store/streams/stream.ex
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ defmodule EventStore.Streams.Stream do
conn,
fn transaction ->
with {:ok, stream} <- stream_info(transaction, stream_uuid, expected_version, new_opts),
{:ok, stream} <- prepare_stream(transaction, stream, opts),
:ok <-
do_append_to_storage(
transaction,
Expand Down

0 comments on commit 3a4638e

Please sign in to comment.