I'm looking for a way to determine if a Get failed due to a socket read
timout vs. just didn't find the value in cache. If I use GetWithCas, is
there a common way to look at the Cas value to determine the operation
failed ? For example, if its zero, does that mean it failed ? Also would
need to do that for MultiGet. Thanks.

Search Discussions

  • A. at Oct 13, 2011 at 5:18 pm
    currently there is no difference between the two. (there is a chance that the code initializes the CAS field with -1 but i cannot look it up right now. check the implementation in protocol/binary)

    the next version will have an option to throw exception when serious errors occur i just need to figure out how to do this without breaking backward compatibility


    On Oct 13, 2011, at 7:03 PM, bradrover wrote:

    I'm looking for a way to determine if a Get failed due to a socket read timout vs. just didn't find the value in cache. If I use GetWithCas, is there a common way to look at the Cas value to determine the operation failed ? For example, if its zero, does that mean it failed ? Also would need to do that for MultiGet. Thanks.
  • Bradrover at Oct 13, 2011 at 5:31 pm
    What about a configurable ExceptionHandlingPolicy ? Where we could inject
    the code to simply re throw if we wanted to. I don't know if that would work
    for all cases, such as where you have code to dispose things in the catch
    block or in a multiget wait. The default could continue to just eat the
    exceptions.
  • A. at Oct 13, 2011 at 5:36 pm
    the problem is not with the implementation per-se, but the configuration. i do not want to make all operations depend on the I*ClientConfiguration but somehow they need to know when throw throw and when to not (or all exceptions could bubble up but then i need to pt in way more try..catches). i have the concept but the code needs refactoring and sometimes life gets in the way
    On Oct 13, 2011, at 7:31 PM, bradrover wrote:

    What about a configurable ExceptionHandlingPolicy ? Where we could inject the code to simply re throw if we wanted to. I don't know if that would work for all cases, such as where you have code to dispose things in the catch block or in a multiget wait. The default could continue to just eat the exceptions.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupenyim-memcached @
categoriesmemcached
postedOct 13, '11 at 5:03p
activeOct 13, '11 at 5:36p
posts4
users2
websitememcached.org

2 users in discussion

A.: 2 posts Bradrover: 2 posts

People

Translate

site design / logo © 2021 Grokbase