Comments (8)
Original comment by [email protected]
on 4 Mar 2008 at 12:15
- Added labels: Type-Enhancement
- Removed labels: Type-Defect
from spymemcached.
perhaps another way at looking at this is to create a configurable timeout,
that can
be adjusted by the user. for example, on the asyncget() command, you have a
configurable timeout. What would be interesting would be to have a timeout
that
could be configured on a clientwide and possibly overridden on a per request
basis.
Original comment by [email protected]
on 7 Mar 2008 at 11:17
from spymemcached.
I mentioned on the mailing list that the incr and decr functions have no
timeouts at
all currently. I am providing a patch here that adds overloads for those
functions as
well as a default timeout for 1000 millis for the original methods.
We need a way to make the default timeout configurable, or at least take an
opinionated stance on what the default should be set at.
Original comment by [email protected]
on 19 Mar 2008 at 6:29
Attachments:
from spymemcached.
Is it really valuable to have per-method overrides of these timeouts?
I ask because we've added a couple of variations on some of these methods now and
java doesn't have a way to control that growth short of adding an Options
object of
some sort. As it is, every slight variation multiplies the number of methods.
If it would be sufficient to set a global option, that would be far preferable.
Original comment by [email protected]
on 19 Mar 2008 at 6:45
from spymemcached.
I agree it's totally filthy.
Actually I didn't even want to include TimeUnit in the signature. The problem
with
that was the incr(with override) and incr(without override, with timeout)
collide.
I'm all for the global option at the end of the day. Whatever makes it not
infinite :)
Original comment by [email protected]
on 19 Mar 2008 at 6:52
from spymemcached.
More and more I come across scenarios where this global timeout is really a
must-have. We cant have things like incr, decr, and getStats hanging
indefinitely
till a missing memcached comes back. I've begun a patch around the global
timeout for
places where we're waiting on a latch (like the ops I mentioned).
Adding timeouts to places where we're using Futures becomes an exercise in
exception
handling. Any suggestions on what you'd like to do there? Eat it and return
null?
Re-throw it as a RuntimeException? Create our own TimeoutException that extends
RuntimeException? Add it to Throws?
Original comment by [email protected]
on 26 Mar 2008 at 1:31
from spymemcached.
Yes this is the problem I ran into when I last tried to do something with it.
I'm
not a huge fan of checked exceptions for this reason. I kind of like the idea
of
making an unchecked timeout exception for this purpose.
It's somewhat rare that someone should see a timeout in practice, but it should
also
not be very surprising when it happens. A clear timeout message and a mention
in the
docs is probably better than telling everyone they need to handle it all the
time as
a checked exception.
Original comment by [email protected]
on 29 Mar 2008 at 7:07
from spymemcached.
Much thanks to Ray for doing this fix. 1eb2c9ec10c0ec37b3c04fa4b9fd874a642cb899
Original comment by [email protected]
on 2 May 2008 at 3:55
- Changed state: Fixed
from spymemcached.
Related Issues (20)
- NPE happening in TCPMemcachedNodeImpl.fillWriteBuffer under heavy load
- Memory Leak in LinkedBlockingQueue in AsciiMemcachedNodeImpl/TCPMemcachedNodeImpl
- JVM crashed always with Memcached IO over
- NPE
- Allow to configure MAX_CLONE_COUNT parameter
- CASMutator.cas should throw typed exception
- read/write queues are not being cleared incase of faulty server:port, proposed a fix
- How to get more two values using get(key) API ?
- Broken link on "Project Home"
- Memcache sets taking unusually long time HOT 1
- Unable to read Binary data (C Struct) from Memcache HOT 7
- MemcacheClient with SerializingTranscoder isn't thread safe
- Very big performance issue with large numbers of asyncGets
- java.lang.AssertionError: Unknown line type: STORED HOT 1
- can spymemcached cause race condition?
- Missing CAS API (With exp. time and without Transcoder) HOT 1
- Booleans contained in Clojure maps deserialized as new instances of java.lang.Boolean - breaks "if" HOT 1
- Client never connects with small timeout (auth problem)
- getBulk() doesn't use FailureMode HOT 3
- Set request fails after restarting the server HOT 1
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 spymemcached.