pjfanning commented on code in PR #511:
URL:
https://github.com/apache/pekko-persistence-r2dbc/pull/511#discussion_r4375761168
##########
core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/PubSub.scala:
##########
@@ -132,23 +133,25 @@ import org.slf4j.LoggerFactory
val offset = TimestampOffset(timestamp, timestamp, Map(pid ->
pr.sequenceNr))
- val (eventPayload, tags) = pr.payload match {
+ val (eventOption, tags, filtered) = pr.payload match {
case Tagged(payload, tags) =>
- (payload, tags)
+ (Some(payload), tags, false)
Review Comment:
Fixed in 2c9d429: both non-filtered branches use `Option(...)` again, so a
null payload stays `None`.
##########
core/src/main/scala/org/apache/pekko/persistence/r2dbc/internal/PubSub.scala:
##########
@@ -132,23 +133,25 @@ import org.slf4j.LoggerFactory
val offset = TimestampOffset(timestamp, timestamp, Map(pid ->
pr.sequenceNr))
- val (eventPayload, tags) = pr.payload match {
+ val (eventOption, tags, filtered) = pr.payload match {
case Tagged(payload, tags) =>
- (payload, tags)
+ (Some(payload), tags, false)
+ case FilteredPayload =>
Review Comment:
The journal accepts `Tagged` around any payload, so I handled it in 2c9d429
instead of leaving the gap. `Tagged(FilteredPayload, tags)` is matched before
the general `Tagged` case and gives an envelope with no event and `filtered =
true`, and it keeps the tags. Added a test, `turn tagged FilteredPayload to
filtered events with no payload`, which fails without the new case.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]