| Index: go/src/infra/gae/libs/meta/eg.go
|
| diff --git a/go/src/infra/gae/libs/meta/eg.go b/go/src/infra/gae/libs/meta/eg.go
|
| index 8522d5051d6dc7f5e98c26c8d945cb605a1780f0..9997679e5de1c805046f8b65626c32f04c3a3421 100644
|
| --- a/go/src/infra/gae/libs/meta/eg.go
|
| +++ b/go/src/infra/gae/libs/meta/eg.go
|
| @@ -10,6 +10,7 @@ import (
|
| "github.com/luci/luci-go/common/errors"
|
|
|
| "infra/gae/libs/gae"
|
| + "infra/gae/libs/gae/helper"
|
| )
|
|
|
| var mark = errors.MakeMarkFn("eg")
|
| @@ -28,15 +29,14 @@ func GetEntityGroupVersion(c context.Context, root gae.DSKey) (int64, error) {
|
| for root.Parent() != nil {
|
| root = root.Parent()
|
| }
|
| - egm := &EntityGroupMeta{}
|
| rds := gae.GetRDS(c)
|
| - err := rds.Get(rds.NewKey("__entity_group__", "", 1, root), egm)
|
| - if err != gae.ErrDSNoSuchEntity {
|
| - err = mark(err)
|
| - } else {
|
| + egm := &EntityGroupMeta{}
|
| + err := rds.Get(rds.NewKey("__entity_group__", "", 1, root), helper.GetPLS(egm))
|
| + ret := egm.Version
|
| + if err == gae.ErrDSNoSuchEntity {
|
| // this is OK for callers. The version of the entity group is effectively 0
|
| // in this case.
|
| err = nil
|
| }
|
| - return egm.Version, err
|
| + return ret, err
|
| }
|
|
|