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

removing resync and updating some logs #292

Merged
merged 1 commit into from
Apr 16, 2021
Merged

removing resync and updating some logs #292

merged 1 commit into from
Apr 16, 2021

Conversation

shawkins
Copy link
Contributor

No description provided.

@shawkins shawkins requested a review from ppatierno April 16, 2021 12:04
@shawkins
Copy link
Contributor Author

This is to further assist with issues we've seen. Based upon our deeper understanding of resync, it does not need to run at all - this will help remove a potential source of events. The kafkaCluster log is too high for the information it provides, and the resource events should show their resource version - which will help correlate to the state seen in yaml output of the resources.

@@ -74,33 +74,33 @@ void onStart(@Observes StartupEvent ev) {
// TODO: should we make the resync time configurable?

kafkaSharedIndexInformer =
sharedInformerFactory.sharedIndexInformerFor(Kafka.class, KafkaList.class, operationContext, 60 * 1000L);
sharedInformerFactory.sharedIndexInformerFor(Kafka.class, KafkaList.class, operationContext, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

without the resync how does it work in case of lost events?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I need to look more at what the behavior is on 5.0.0 with the 0 setting, but what they have changed the implementation into based upon fabric8io/kubernetes-client#2812 is that resync is purely in memory - it won't contact the api server at all.

Missed events are assumed to not be possible as long as a watch is active. Once a watch is closed a reconnect is performed. Once connected again the logic performs the necessary catch up - that is where we saw the delete bug, because the catch up logic did not update the index in that case.

Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know the fabric8 internal but when you say "resync is purely in memory" ... so it's resyncing with what if it doesn't contact the API server. My understanding was resyncing the in-memory cache contacting the API server.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

They made a mistake in 5.0.0 compared to the go client logic. fabric8 on the resync interval was performing a relist. They are now removing that based upon the linked issue. So the resync expectation is to simply generated update events for everything that exists in the cache - that's it. Since we are ignoring these events anyway (with the resource version difference checks) we don't need any resync.

Copy link
Contributor

Choose a reason for hiding this comment

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

:-o ... so this fabric8 resync sounds like more dangerous than useful imho

Copy link
Contributor Author

Choose a reason for hiding this comment

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

At this point, yes it is. We thought we were relying on behavior that was a mistake... So it's best to turn it off now.

@k-wall k-wall merged commit ea96db7 into bf2fc6cc711aee1a0c2a:main Apr 16, 2021
k-wall pushed a commit that referenced this pull request Apr 16, 2021
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