Git Product home page Git Product logo

Comments (6)

Harwayne avatar Harwayne commented on May 6, 2024

/assign @vaikas-google

from knative-gcp.

n3wscott avatar n3wscott commented on May 6, 2024

@Harwayne can you try this flow again with the operations ?

from knative-gcp.

vaikas avatar vaikas commented on May 6, 2024

as @n3wscott mentions, this should not happen again. The problem was that occasionally depending on which write (finalizer or the status update with the notificationId in Status) would go first we would indeed end up getting the duplicate notification. With the operations model, creating the subscription should be idempotent because the state is stored in the Job that creates the Subscription and not in the reconciler.

from knative-gcp.

vaikas avatar vaikas commented on May 6, 2024

@Harwayne can you still repro this?

from knative-gcp.

Harwayne avatar Harwayne commented on May 6, 2024

Looking through the code, I think it should be much safer now.

However, it is still possible if the Pod creating the notification dies at the wrong time. If the Pod dies after https://github.com/google/knative-gcp/blob/master/pkg/operations/storage/notification.go#L228, but before https://github.com/google/knative-gcp/blob/master/pkg/operations/storage/notification.go#L243, or writing the termination message fails for some reason, then we would still leak a Notification.

One possible solution is to set a custom attribute in the notification to the UID of the Storage object. Then, before creating a Storage notification, list the existing ones and search for that UID. If found, then accept it.

from knative-gcp.

nachocano avatar nachocano commented on May 6, 2024

I cannot repro this in 0.12... leaving it open for now, but may close it in 0.13 if nobody can reproduce

from knative-gcp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.