commit | 0ee865c5a6cc388983522212d083ed63c35f3794 | [log] [tgz] |
---|---|---|
author | Brad Fitzpatrick <bradfitz@golang.org> | Thu Dec 12 03:27:51 2019 +0000 |
committer | Brad Fitzpatrick <bradfitz@golang.org> | Thu Dec 12 05:15:16 2019 +0000 |
tree | 7dd885a6fc6c712fe55c84938e857837c36fae0c | |
parent | 7ea9c31f03469eae868c164309bea4def11d3fbc [diff] |
app/appengine: explicitly mark the Log.CompressedLog field as not indexed The old App Engine datastore API and the new Cloud datastore API have different behaviors with regard to indexing []byte properties. Both APIs say the same: https://godoc.org/google.golang.org/appengine/datastore#hdr-Properties https://godoc.org/cloud.google.com/go/datastore#hdr-Properties > All fields are indexed by default. Strings or byte slices longer > than 1500 bytes cannot be indexed; fields used to store long strings > and byte slices must be tagged with "noindex" or they will cause Put > operations to fail. But empirically only the new cloud API actually returns an error when putting a >1500 []byte value into a field without noindex. Not sure why. Updates golang/go#34744 Change-Id: I15c938e91c92304eb7074de99c19f8e93182283e Reviewed-on: https://go-review.googlesource.com/c/build/+/210998 Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
diff --git a/app/appengine/build.go b/app/appengine/build.go index 014e962..6dbcebc 100644 --- a/app/appengine/build.go +++ b/app/appengine/build.go
@@ -398,7 +398,7 @@ // A Log is a gzip-compressed log file stored under the SHA1 hash of the // uncompressed log text. type Log struct { - CompressedLog []byte + CompressedLog []byte `datastore:",noindex"` } func (l *Log) Text() ([]byte, error) {