From 167fe4867b5389144d6b03c4636aa0a304878b0c Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 26 Jun 2024 16:50:51 -0400 Subject: [PATCH 1/2] =?UTF-8?q?Add=20pok=C3=A9mon=20clauses=20for=20unknow?= =?UTF-8?q?n=20info=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is meant to protect against CaughtUp/FellBehind notifications introduced in but it should be safe to ignore any other unknown info notifications as well. --- lib/volley/in_order_subscription.ex | 4 ++++ lib/volley/persistent_subscription.ex | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/lib/volley/in_order_subscription.ex b/lib/volley/in_order_subscription.ex index b80908e..3b357fe 100644 --- a/lib/volley/in_order_subscription.ex +++ b/lib/volley/in_order_subscription.ex @@ -458,6 +458,10 @@ defmodule Volley.InOrderSubscription do {:stop, reason, state} end + def handle_info(_, state) do + {:noreply, [], state} + end + # coveralls-ignore-stop defp read_stream(state, demand) do diff --git a/lib/volley/persistent_subscription.ex b/lib/volley/persistent_subscription.ex index e720e46..09d1841 100644 --- a/lib/volley/persistent_subscription.ex +++ b/lib/volley/persistent_subscription.ex @@ -163,6 +163,13 @@ defmodule Volley.PersistentSubscription do {:noreply, [map_event(event, state)], state} end + # coveralls-ignore-start + def handle_info(_, state) do + {:noreply, [], state} + end + + # coveralls-ignore-stop + @impl GenStage def handle_demand(_demand, state) do {:noreply, [], state} From 2a89de0209985d6509d19a1d20fc05e2cf7cd346 Mon Sep 17 00:00:00 2001 From: Michael Davis Date: Wed, 26 Jun 2024 16:56:35 -0400 Subject: [PATCH 2/2] Add changelog notes for 1.0.1 --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5397e5..0ee2cfc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,16 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 1.0.1 - 2024-06-26 + +### Fixed + +- Ignored unknown info messages in `Volley.InOrderSubscription` and + `Volley.PersistentSubscription`. + - This protects against the `{:caught_up, reference()}` and + `{:fell_behind, reference()}` notifications introduced in + EventStore 23.10 and later. + ## 1.0.0 - 2022-05-11 This change represents stability in the API. There is no functional change