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

Unified Diff: logdog/appengine/coordinator/endpoints/services/registerStream.go

Issue 2991253004: [logdog] Remove list functionality. (Closed)
Patch Set: fix test Created 3 years, 4 months 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: logdog/appengine/coordinator/endpoints/services/registerStream.go
diff --git a/logdog/appengine/coordinator/endpoints/services/registerStream.go b/logdog/appengine/coordinator/endpoints/services/registerStream.go
index 1429940afb7c421e3ee9ad955fb4d14ee4a6978b..809b1496a10883ed9fe077e5b34dd274a2df4b89 100644
--- a/logdog/appengine/coordinator/endpoints/services/registerStream.go
+++ b/logdog/appengine/coordinator/endpoints/services/registerStream.go
@@ -26,7 +26,6 @@ import (
"github.com/luci/luci-go/logdog/api/logpb"
"github.com/luci/luci-go/logdog/appengine/coordinator"
"github.com/luci/luci-go/logdog/appengine/coordinator/endpoints"
- "github.com/luci/luci-go/logdog/appengine/coordinator/hierarchy"
"github.com/luci/luci-go/logdog/appengine/coordinator/mutations"
"github.com/luci/luci-go/logdog/common/types"
"github.com/luci/luci-go/tumble"
@@ -153,22 +152,6 @@ func (s *server) RegisterStream(c context.Context, req *logdog.RegisterStreamReq
return nil, err
}
- // The stream is not registered. Perform a transactional registration via
- // mutation.
- //
- // Determine which hierarchy components we need to add.
- comps := hierarchy.Components(path, true)
- if comps, err = hierarchy.Missing(c, comps); err != nil {
- log.WithError(err).Warningf(c, "Failed to probe for missing hierarchy components.")
- }
-
- // Before we go into transaction, try and put these entries. This should not
- // be contested, since components don't share an entity root.
- if err := hierarchy.PutMulti(c, comps); err != nil {
- log.WithError(err).Errorf(c, "Failed to add missing hierarchy components.")
- return nil, grpcutil.Internal
- }
-
// The stream does not exist. Proceed with transactional registration.
lstKey := ds.KeyForObj(c, lst)
err = tumble.RunUnbuffered(c, lstKey, func(c context.Context) ([]tumble.Mutation, error) {

Powered by Google App Engine
This is Rietveld 408576698