pjfanning opened a new pull request, #637: URL: https://github.com/apache/pekko-projection/pull/637
### Motivation `FilterStage.mapEntityIdToPid` builds the persistence id for entity ids in consumer filter criteria (`IncludeEntityIds`, `ExcludeEntityIds`, etc.). For plain entity ids it uses the stream's `entityType`, but for replicated entity ids (containing the `|` separator) it used the `streamId`. That works when the stream id equals the entity type name, which is the default for Replicated Event Sourcing, but not when `ReplicationSettings.withStreamId` is used: the constructed persistence id then has the wrong type name, so the slice check and replay query don't match any events. ### Modification Use `entityType` in both branches of `mapEntityIdToPid`, in line with the comment above it. ### Result `IncludeEntityIds` and `ExcludeEntityIds` with replicated entity ids work regardless of the stream id. ### Tests - `sbt grpc-test/test` - passed - New `FilterStageSpec` test "map replicated entity ids in filter criteria with the entity type" fails without the change (the spec already uses a stream id that differs from the entity type) - `sbt grpc/Compile/scalafmtCheck grpc-test/Test/scalafmtCheck` - passed - MiMa not run - no `mimaReportBinaryIssues` task for the grpc module; change is internal only ### References Fixes #634 -- 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]
