Giter VIP home page Giter VIP logo

Comments (2)

yehiyam avatar yehiyam commented on August 26, 2024

I figured out that this happens when the sequence is:

  • watch
  • cancel
  • watch
  • cancel
  • ...
    I saw in the code that the client will close the stream after the cancel and create a new one for the new watch. I assume that the server creates a new object with new indexing.

from etcd3.

srz09 avatar srz09 commented on August 26, 2024

Hey, I had the same problem !
All my watchers ids were 0 causing trouble when canceling them.
Maybe it's not the same cause than yours, but in case of here what I did:

  • Created an instance of the library
  • Based on this instance, created a namespace object
  • Based on this namespace, created some watchers
    I was assuming that I used the same "namespace" instance in my all app but in fact I did a little mistake, and the namespace was not a singleton but it was created each time causing the new watchers to have the id "0".

Maybe check if you're not re-creating a new instance of the lib/namespace to be sure all your watchers are linked to the same instance.

Hope it helps
Cheers

from etcd3.

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.