Event broadcast based cache invalidation#3001
Merged
Conversation
mschuwalow
reviewed
Mar 17, 2026
| deployment_hash: deployment_revision.hash, | ||
| }; | ||
| // Query domains and record registry change event in the same transaction | ||
| let domains = Self::query_domains_for_environment(tx, environment_id).await?; |
Contributor
There was a problem hiding this comment.
Domain registrations do not change as part of a deployment, but rather in a separate crud api. This should be checked there.
mschuwalow
reviewed
Mar 17, 2026
| golem.common.EnvironmentId environment_id = 1; | ||
| uint64 deployment_revision = 2; | ||
| // Union of old and new domains — includes removed domains for cache invalidation. | ||
| repeated string domains = 3; |
Contributor
There was a problem hiding this comment.
This is not part of the deployment / should be separate event
Contributor
Author
There was a problem hiding this comment.
thanks, I took "atomic deployment" too literally, i guess :)
Contributor
There was a problem hiding this comment.
Everything that is part of the manifest is atomic. There is just certain admin stuff that is handled separately / has its own lifecycle and behaves in a special way.
Right now those are:
- domains
- security schemes
- secrets
mschuwalow
reviewed
Mar 17, 2026
|
|
||
| // Streamed to worker-service subscribers when any registry state changes. | ||
| // Each event carries exactly one payload variant. | ||
| message RegistryInvalidationEvent { |
Contributor
There was a problem hiding this comment.
We will also need security scheme changes for the worker service / http api
noise64
reviewed
Mar 18, 2026
golem-registry-service/db/migration/postgres/008_registry_change_events.sql
Outdated
Show resolved
Hide resolved
noise64
approved these changes
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #2431
This PR introduces a new, extensible way how registry service change events can be propagated to other services for cache invalidation purposes. This directly solves one invocation hot-path performance issue but I applied it in other places as well.
The basic architecture is the following:
pg_notify/listen