Skip to content

[IndexDatastore] For the out-of-date trigger notifications report all the out-of-date files without any coalescing #8

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

Merged
merged 1 commit into from
Feb 7, 2019

Conversation

akyrtzi
Copy link
Contributor

@akyrtzi akyrtzi commented Feb 7, 2019

Previously if there were multiple headers that got out-of-date and they were all included by the same main file, it would trigger a single notification for that main file. With these changes there will be notifications for each file.

This allows clients to get the full information of what needs to get updated and they get the responsibility for doing any kind of coalescing they want.

… the out-of-date files without any coalescing

Previously if there were multiple headers that got out-of-date and they were all included by the same main file, it
would trigger a single notification for that main file. With these changes there will be notifications for each file.

This allows clients to get the full information of what needs to get updated and they get the responsibility for doing any
kind of coalescing they want.
@akyrtzi akyrtzi requested a review from benlangmuir as a code owner February 7, 2019 07:27
@akyrtzi akyrtzi merged commit be2bb84 into swiftlang:master Feb 7, 2019
@akyrtzi akyrtzi deleted the out-of-date-notifications branch February 7, 2019 07:29
@benlangmuir
Copy link
Contributor

Can you say more about how this should work end-to-end? From a quick read, it seems like we have already coalesced multiple changes to a unit, then we split them up into multiple notifications, and then the client would probably want to coalesce them back together again. Is there an advantage to having multiple notifications like this, instead of changing the notification to contain multiple changes?

@akyrtzi
Copy link
Contributor Author

akyrtzi commented Feb 7, 2019

instead of changing the notification to contain multiple changes?

That would be more complicated. Right now the changed notifications are reported immediately as the datastore becomes aware of them. Having a single notification with multiple changes for a unit would involve more complicated coalescing, potentially involving timers, and coalescing at the unit level only would not be enough, otherwise the client would still need to do global coalescing anyway.

I find it a better model to keep indexstore a simple notification producer and leave the complicated coalescing logic at the client level.

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