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

Unified Diff: logdog/appengine/coordinator/service.go

Issue 2592753002: Create unbuffered Tumble entry point for LogDog. (Closed)
Patch Set: Created 4 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
« no previous file with comments | « logdog/appengine/coordinator/mutations/createArchiveTask.go ('k') | tumble/process.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: logdog/appengine/coordinator/service.go
diff --git a/logdog/appengine/coordinator/service.go b/logdog/appengine/coordinator/service.go
index 4a451e654eab64bb4be044ef7c373558988736f8..26dadb169af8e40ff4aa88f16749ec8babc831de 100644
--- a/logdog/appengine/coordinator/service.go
+++ b/logdog/appengine/coordinator/service.go
@@ -257,12 +257,13 @@ func (s *prodServicesInst) newBigTableStorage(c context.Context) (Storage, error
return nil, errors.New("failed to create BigTable credentials")
}
+ // Use an AppEngine Context so we have access to the socket API. This is
Vadim Sh. 2016/12/20 21:25:15 this doesn't look like a part of this CL
+ // needed by AppEngine Classic for gRPC connections.
+ //
// Explicitly clear gRPC metadata from the Context. It is forwarded to
// delegate calls by default, and standard request metadata can break BigTable
// calls.
- c = metadata.NewContext(c, nil)
-
- st, err := bigtable.New(c, bigtable.Options{
+ st, err := bigtable.New(metadata.NewContext(s.aeCtx, nil), bigtable.Options{
Project: bt.Project,
Instance: bt.Instance,
LogTable: bt.LogTableName,
@@ -469,6 +470,9 @@ type URLSigningResponse struct {
type bigTableStorage struct {
// Storage is the base storage.Storage instance.
storage.Storage
+ // aeCtx is an AppEngine Context with "luci/gae" services also installed. This
+ // must be used for BigTable access in order to use the AppEngine sockets API.
+ aeCtx context.Context
}
func (*bigTableStorage) GetSignedURLs(context.Context, *URLSigningRequest) (*URLSigningResponse, error) {
« no previous file with comments | « logdog/appengine/coordinator/mutations/createArchiveTask.go ('k') | tumble/process.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698