Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: optimize destination query in router-publisher #5523

Merged
merged 2 commits into from
Jan 11, 2024

Conversation

wanglonghong
Copy link
Contributor

@wanglonghong wanglonghong commented Jan 10, 2024

Description

Type of change

  • Docs change / dependency upgrade
  • Configuration / tooling changes
  • Refactoring
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Requires changes in customer code

High-level change(s) description - from the user's perspective

Related Issue(s)

Fixes

Related pull request(s)

allTxById.delete(transferId);
}
}
txIdsByDestinationDomain.delete(destinationDomain);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this not be removed only if !allowedDomains ?
Like:

        if (!allowedDomains.includes(destinationDomain)) {
          const transferIdsToRemove = txIdsByDestinationDomain.get(destinationDomain);
          for (const transferId of transferIdsToRemove ?? []) {
            allTxById.delete(transferId);
          }
          txIdsByDestinationDomain.delete(destinationDomain);  
        }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you're right

@wanglonghong wanglonghong merged commit 271f0b7 into main Jan 11, 2024
22 checks passed
@wanglonghong wanglonghong deleted the optimized-destination-query-in-router branch January 11, 2024 03:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants