Comments (9)
Do you get an error or other notification that the memcache lock failed?
from nds.
There isn't an error. It's just that there is a very tiny possibility that nds.Get
will return stale results from its cache after using nds.RunInTransaction
if the sequence of events occur exactly as described above.
It's makes the difference of the nds package having complete cache consistency compared to strong cache consistency.
from nds.
If there isn't any way to know whether or not memcache failed in the way you describe, you could force a cache reload at the end of every RunInTransaction request.
from nds.
That would help a bit, but if the cache reload failed we would still end up with a stale cache. I am beginning to think the package as it is now, although not perfect, is the best possible situation.
from nds.
I don't have any issues with the possibility of that cache error. It seems very unlikely, and as the datastore is eventually consistent anyways, people should already be ready for the possibility of stale data.
from nds.
The Get, Put and Delete datastore calls are strongly consistent. Only queries without an ancestor are eventually consistent. I rely on those guarantees for the type of code I write - which is why it is taking me so long to get this package right.
from nds.
What about adding FlushCache(key) / FlushCacheAll() functions so that you can eliminate keys in the event that you absolutely can't have stale results?
from nds.
What about a GetIgnoreCache
?
from nds.
With NDS the datastore never has the opportunity to be populated with stale results. It will always be 100% intact. So if you really need to return 100% non stale results you could just use datastore.Get
perfectly fine which would be the equivalent of the GetIgnoreCache
you suggested.
from nds.
Related Issues (20)
- Support Managed VMs HOT 18
- memcache: server error HOT 12
- Remove zeroMemcache* code. HOT 1
- It is not possible to detect if nested contexts are transactional. HOT 5
- Make the transaction context safe for concurrent access. HOT 1
- Failing tests with "appengine: NewContext passed an unknown http.Request" HOT 2
- Different namespaces used for memcache and datastore HOT 4
- Migrating data when the underlying struct changes HOT 2
- Tests fail when using nds HOT 14
- nds item not stored warning HOT 4
- Calling AddMulti for a single entity instead of Add HOT 2
- Panic with datastore.PropertyLoadSaver HOT 3
- Make compatible with cloud.google.com/go HOT 8
- ErrFieldMismatch in GetMulti returns only one result HOT 4
- Gracefully handle memcache quota limits HOT 2
- Support saving of entities to memcache in putMulti() HOT 7
- Tag v2 branch as v2.0.0 HOT 3
- [v2] Possible marshal/unmarshaling bug HOT 2
- Change locking policy for Transaction HOT 1
- Change module versioning from git branches to subdirectories. HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nds.