Xing Zeng
Dec 8, 2020

For the Read implementation amended based on Memcache, should there be a link getting out of `atomic_check_and_set` to `sleep for a short time` when the current value in the cache is not lease_nounce (represents that a Write enters and invalidate this cache?)

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Xing Zeng
Xing Zeng

Written by Xing Zeng

Study and Work in NLP & Big Data

Responses (3)

Write a response

Hi Xing, there are several different ways you can react to the lease being cleared by a writer. The simplest is to do nothing. You got the results from your system of record and you can just return it and be done. You pass the opportunity to…

--

Hahah, omg Medium trolled me and for some reason my original comment didn't show up until I posted the above followup. Sounds like there's room for stricter consistency in their systems :)

--

Ooops, I'm sorry... somehow I didn't notice this comment until now. If the current value in the cache is not lease_nonce, the atomic_check_and_set will fail. However, the value the client asked for was already read from the system of record, so…

--