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(kds): race condition on fill metadata (backport of #8872) #8996

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pkg/kds/v2/reconcile/reconciler.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@
lock sync.Mutex
}

<<<<<<< HEAD

Check failure on line 49 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: non-declaration statement outside function body

Check failure on line 49 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

expected declaration, found '<<' (typecheck)
func (r *reconciler) Clear(node *envoy_core.Node) {
=======

Check failure on line 51 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected ==, expected }
func (r *reconciler) Clear(ctx context.Context, node *envoy_core.Node) error {
>>>>>>> 9346b2d5c (fix(kds): race condition on fill metadata (#8872))

Check failure on line 53 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected >>, expected }

Check failure on line 53 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

invalid character U+0023 '#'

Check failure on line 53 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

illegal character U+0023 '#' (typecheck)
id := r.hasher.ID(node)
r.lock.Lock()
defer r.lock.Unlock()
Expand All @@ -63,6 +67,7 @@
}
}

<<<<<<< HEAD
func (r *reconciler) Reconcile(ctx context.Context, node *envoy_core.Node) error {
new, err := r.generator.GenerateSnapshot(ctx, node)
if err != nil {
Expand All @@ -71,6 +76,9 @@
if new == nil {
return errors.New("nil snapshot")
}
=======

Check failure on line 79 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected ==, expected }
func (r *reconciler) Reconcile(ctx context.Context, node *envoy_core.Node, changedTypes map[core_model.ResourceType]struct{}, logger logr.Logger) (error, bool) {
>>>>>>> 9346b2d5c (fix(kds): race condition on fill metadata (#8872))

Check failure on line 81 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

syntax error: unexpected >>, expected }

Check failure on line 81 in pkg/kds/v2/reconcile/reconciler.go

View workflow job for this annotation

GitHub Actions / lint

invalid character U+0023 '#' (typecheck)
id := r.hasher.ID(node)
old, _ := r.cache.GetSnapshot(id)
new = r.Version(new, old)
Expand Down
Loading