Skip to content

Commit

Permalink
🔨refactor: Use mapConcat instead of flatMapConcat for flattening Option
Browse files Browse the repository at this point in the history
  • Loading branch information
negokaz committed Feb 18, 2022
1 parent 244f3d3 commit ba4a77c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ private[entityreplication] class SnapshotSyncManager(
// prefer the latest term, index and offset
Option(newEvent.mergeEntityIds(event))
}
.flatMapConcat(e => Source(e.toSeq))
.mapConcat(identity) // flatten the `Option` element
.flatMapConcat { event =>
Source(event.entityIds)
.mapAsync(settings.snapshotSyncCopyingParallelism) { entityId =>
Expand Down

0 comments on commit ba4a77c

Please sign in to comment.