Giter Site home page Giter Site logo

Set doesn't fresh cache about python-etcd HOT 5 CLOSED

jplana avatar jplana commented on June 29, 2024
Set doesn't fresh cache

from python-etcd.

Comments (5)

tiw avatar tiw commented on June 29, 2024

It was not the problem about the cache. Urllib3 send request in a new thread. I'm not sure whether this way is good.

pprint(client.read('/omsstaging/db/name').value)
client.write('/omsstaging/db/name', u'oms_staging1')
time.sleep(5)
pprint(client.read('/omsstaging/db/name').value)

output

u'oms_staging'
u'oms_staging1'

from python-etcd.

lavagetto avatar lavagetto commented on June 29, 2024

I cannot reproduce your problem with a 1-node setting; how do you initialize your client? Are you leaving allow_reconnect=True ?

This looks most definitely like and etcd issue or an issue with your setup.

from python-etcd.

tiw avatar tiw commented on June 29, 2024

With one node etcd it works fine. But if you try it with a etcd cluster you will reproduce the problem.

The whole test script like:

from etcd import Client
from pprint import pprint
import time

client = Client(host='localhost', port=44001)#, allow_reconnect=True)

pprint(client.read('/omsstaging/db/name').value) # assuming value is oms_staging
client.write('/omsstaging/db/name', u'oms_staging1', 0) # set to different value
pprint(client.read('/omsstaging/db/name').value)

from python-etcd.

lavagetto avatar lavagetto commented on June 29, 2024

@tiw this is clearly an etcd problem, but let me some time to dig deeper. Reopening for now, I'll update when I have some time to work with etcd to do tests.

from python-etcd.

lavagetto avatar lavagetto commented on June 29, 2024

I have a 3-node cluster setup (on 3 separate servers) and I am not able to reproduce this on the current etcd HEAD. So, closing it.

from python-etcd.

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.