pjfanning opened a new pull request, #633:
URL: https://github.com/apache/pekko-projection/pull/633

   ### Motivation
   Replayed events requested with a `ReplayReq` were not checked against the 
entity type of the stream, unlike `loadEvent`, `eventTimestamp` and replay 
triggered by `IncludeEntityIds` (which always maps entity ids with the stream's 
entity type).
   
   Replayed events and events returned by `loadEvent` also did not go through 
the producer filter, although the producer filter is documented to have 
priority over consumer defined filters.
   
   ### Modification
   - `FilterStage` ignores replay of persistence ids that don't belong to the 
entity type of the stream.
   - `FilterStage` applies the producer filter to replayed events. The consumer 
filter is still not applied to replays, as before. Events excluded by the 
producer filter are emitted without payload, as `FilteredEvent`, so that the 
consumer doesn't see a gap in sequence numbers (which would otherwise trigger 
another replay).
   - `loadEvent` returns `FilteredEvent` for events excluded by the producer 
filter.
   - Envelopes marked as `filtered` are emitted as `FilteredEvent` instead of 
as an `Event` without payload.
   
   ### Result
   Replay and `loadEvent` are consistent with the entity type of the stream and 
with the producer filter.
   
   ### Tests
   - `sbt grpc-test/test` - 75 passed
   - New `FilterStageSpec` and `EventProducerServiceSpec` tests fail without 
the main code change
   - `sbt grpc/Compile/scalafmtCheck grpc-test/Test/scalafmtCheck` - passed
   - `sbt grpc/headerCheckAll grpc-test/Test/headerCheckAll` - passed
   - MiMa not run - no `mimaReportBinaryIssues` task for the grpc module; only 
change is to internal API
   - `sortImports` not run - task not available in this build
   - `grpc-int-test` not run locally - requires database, left to CI
   
   ### References
   None - consistency fix for gRPC producer replay
   


-- 
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]

Reply via email to