Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible bug - Multi-Zone fallback #7

Closed
pat-humphreys opened this issue Sep 5, 2013 · 4 comments
Closed

Possible bug - Multi-Zone fallback #7

pat-humphreys opened this issue Sep 5, 2013 · 4 comments

Comments

@pat-humphreys
Copy link

evcache-client-1.0.5

I am using the ZoneClusteredEVCacheClientPoolImpl with 1 client instance and 6 memcache servers (3 in each zone). If I write a key to both zones and then kill the primary memcache the next read for that key goes to the primary first.

Then realizes that the primary is down, throws an exception which is caught in EVCacheImpl.get(String key, EVCacheTranscoder tc) where it does the following check

Line 244

catch (Exception ex) {
//TODO: Add counter for exception ?
if (log.isDebugEnabled()) {
log.debug("Exception while getting data for key : " + key, ex);
}
if (!_throwException.get()) {
return null;
}
throw new EVCacheException("Exception getting data for key : " + key, ex);
}

it then returns a null.

The next request for this key goes to the secondary and succeeds, should it not try the secondary rather than returning a null?

@smadappa
Copy link
Contributor

smadappa commented Sep 6, 2013

Good catch, in the current implementation a calls fails before the fallback can work.
I will work on a fix for this.

@pat-humphreys
Copy link
Author

Good to hear its a defect. It was driving me mad :)
If you don't have time to look at it. I can do it for you?

@smadappa
Copy link
Contributor

smadappa commented Sep 6, 2013

The would be great. If you are thinking of an approach let me know and i can comment.

@stacey-david
Copy link

Hi @smadappa ,

Can you confirm whether this issue was actually fixed?

tcellucci pushed a commit to tcellucci/EVCache that referenced this issue Oct 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants