-
Notifications
You must be signed in to change notification settings - Fork 72
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
Groupcache fails to distribute across peers #33
Comments
@jon-whit I know this won't help and I don't have the answer, but I did try your code against the original |
Yeah, it's like the package literally doesn't do what it's meant to do 😂 |
@jon-whit your example has a bug because you never expose |
@tymeshifter I changed the code as follows:
And I get the same issues I mentioned above. So I'm not so sure that it's an issue of the pool not being exposed over HTTP. In the old example it is exposed over the DefaultServeMux. Maybe you can provide an example that exhibits the behavior I'm expecting to see? Because I'm not able to get it to work at all like I'd expect. |
I don't follow the issue here, I'm not sure what you are trying to accomplish. The README contains a working example of how the library is to be used. The code you posted doesn't appear to call the pool handler at all, so it's not going to work in the way the library was designed. |
@thrawn01 how do you figure? I passed the pool into the http.Server just like README and implemented some handlers that leverage the group and it doesn't behave as described. Could you clarify the rationale behind your comment? |
I understand what you are trying todo now! Amazing what a good night sleep will do. 😄 You have a few things wrong, also maybe some miss-understanding of what the library does and how it works.
I hope this makes more sense. I'll add an additional comment in the example to explicitly call out that you MUST identify the current instance by passing the argument |
See ece2929 |
I have the following application:
I run two instances of this application:
Can you explain why I see this behavior?
but, if I reverse the operations and issue them against the second server I get
Why is this? Shouldn't the group cache return the value previously read by any peer (e.g. the cache is shared by the cache group) so long as no error happened with the
dest.SetBytes(..)
call?The text was updated successfully, but these errors were encountered: