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

Prevent duplicate uri property update #1003

Merged
merged 1 commit into from
Jun 9, 2024
Merged

Prevent duplicate uri property update #1003

merged 1 commit into from
Jun 9, 2024

Conversation

bohhyang
Copy link
Contributor

@bohhyang bohhyang commented Jun 6, 2024

Summary

Uri subscriber can receive duplicate uri properties during INDIS migration as both ZK data and Kafka data are input on INDIS Observer (using ZK data to cover server apps that don't emit or partially emit kafka data). Since Kafka data has higher precedence, when Kafka data arrives later than ZK data, it will be sent to the client although the uri properties inside is effectively the same as ZK data, which is still needed, since the metadata is different, like tracing ID, modified time, etc, the client will send tracking events of receipt to track the end-to-end propagation latency for Kafka announcements.

This change only prevents uri subscriber from processing the inner duplicate uri properties as an update, which will prevent all subsequent actions taken by the uri property listeners. (note: there are other edge cases of receiving duplicate uri properties, such as when the version in the uri properties is incremented but the data is unchanged. This change generally protect against all of them and can help us investigate such case in the future)

Testing Done

QEI deployed indis-canary, restart indis-canary backend (which will trigger uri property update with markdowns then back up. When uri is back up, the client will receive it twice), look for logs "received duplicate uri properties" by UriLoadBalancerSubscriber (set log level INFO)

indis-canary.log

Copy link
Collaborator

@brycezhongqing brycezhongqing left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for the change

@bohhyang bohhyang merged commit 86a14bd into master Jun 9, 2024
2 checks passed
@bohhyang bohhyang deleted the by/dupUriUpdate branch June 9, 2024 17:19
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.

2 participants