Skip to content

Commit

Permalink
Inverse the condition to clarify the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
lhotari committed Apr 2, 2021
1 parent e4ac3a3 commit 2cb384b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ private void checkReplicatedSubscriptionMarker(Position position, MessageImpl<?>

int markerType = msg.getMessageBuilder().getMarkerType();

if (!msg.getMessageBuilder().hasReplicatedFrom() ||
!remoteCluster.equals(msg.getMessageBuilder().getReplicatedFrom())) {
if (!(msg.getMessageBuilder().hasReplicatedFrom()
&& remoteCluster.equals(msg.getMessageBuilder().getReplicatedFrom()))) {
// Only consider markers that are coming from the same cluster that this
// replicator instance is assigned to.
// All the replicators will see all the markers, but we need to only process
Expand Down

0 comments on commit 2cb384b

Please sign in to comment.