Skip to content

Conversation

@t3-aoki
Copy link

@t3-aoki t3-aoki commented Mar 6, 2020

When memcache.SetMulti() returns appengine.MultiError in following part, nds.putMulti() returns nil as []*datastore.Key.

nds/put.go

Lines 157 to 160 in de1d21b

} else if err := memcacheSetMulti(memcacheCtx,
lockMemcacheItems); err != nil {
return nil, err
}

It causes a panic (index out of range) in following part of nds.PutMulti() because it makes putKey[i] nil.

nds/put.go

Line 79 in de1d21b

groupedKeys[lo+j] = putKeys[i][j]

This PR will fix the issue in v1.
I think there is same bug in v2.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 2bf4eed on t3-aoki:fix-mishandling-of-memcache-error into 304641c on qedus:master.

@t3-aoki t3-aoki marked this pull request as ready for review March 6, 2020 00:47
@jongillham
Copy link
Member

Thank you very much for this! I'll have a look and merge.

Any idea why go.mod and go.sum have so many extra dependencies with this update?

@t3-aoki
Copy link
Author

t3-aoki commented Mar 18, 2020

@jongillham Thank you for your comment.

Any idea why go.mod and go.sum have so many extra dependencies with this update?

Sorry for lack of the information. The aetest broken since gcloud v265.0.0, so I had to update golang/appengine to fix it.
Please refer:
golang/appengine#214

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

Successfully merging this pull request may close these issues.

3 participants