Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Unified Diff: filter/dscache/support.go

Issue 1516173002: Fix error message from KeyForObj when passing an invalid struct. (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: remove accidental extra test Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: filter/dscache/support.go
diff --git a/filter/dscache/support.go b/filter/dscache/support.go
index ea64460886d971efa1272e9e7072d08e3058f60c..4a2480ab7d29162ff37510758d453a2767109e2c 100644
--- a/filter/dscache/support.go
+++ b/filter/dscache/support.go
@@ -42,7 +42,8 @@ func (s *supportContext) numShards(k *ds.Key) int {
func (s *supportContext) mkRandKeys(keys []*ds.Key, metas ds.MultiMetaGetter) []string {
ret := []string(nil)
for i, key := range keys {
- if !metas.GetMetaDefault(i, CacheEnableMeta, true).(bool) {
+ mg := metas.GetSingle(i)
+ if !ds.GetMetaDefault(mg, CacheEnableMeta, true).(bool) {
continue
}
shards := s.numShards(key)
« no previous file with comments | « filter/dscache/ds.go ('k') | filter/txnBuf/txnbuf_test.go » ('j') | service/datastore/pls.go » ('J')

Powered by Google App Engine
This is Rietveld 408576698