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

encounter fault, "Get failed memcache: unexpected line in get response: "ERROR\r\n"" #110

Closed
clee1602 opened this issue Nov 10, 2019 · 3 comments

Comments

@clee1602
Copy link

clee1602 commented Nov 10, 2019

memcached version: 1.5.1
code:
// Set
foo := &memcache.Item{Key: "home", Value: []byte("fooval")}
err := mc.Add(foo) // work 0k here
if err != nil {
fmt.Println("Set failed once", err.Error())
}
err = mc.Add(foo) // work 0k here
if err != nil {
fmt.Println("Set failed secondly", err.Error())
}

// Get
it, err := mc.Get("home")
if err != nil {
fmt.Println("Get failed", err.Error()) // failed here
} else {
if string(it.Key) == "foo" {
fmt.Println("Add value is ", string(it.Value))
} else {
fmt.Println("Get failed")
}
}

@bradfitz
Copy link
Owner

What's the bug report or question?

@clee1602
Copy link
Author

What's the bug report or question?

add 3 comments in the code, the last one is the question

@clee1602
Copy link
Author

i see
cause memcache.cpp line 366
if _, err := fmt.Fprintf(rw, "gets %s\r\n", strings.Join(keys, " ")); err != nil {
not "gets" command, it should be "get %s..."
for memcached version: 1.5.1
thx, Pro. Brad

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

2 participants