Revert more

pull/4274/head
Hongyu Chen 9 years ago
parent 134cac2004
commit 3f96667139
  1. 2
      src/core/census/context.h
  2. 2
      src/core/surface/call.c
  3. 13
      src/core/surface/channel.c
  4. 4
      src/core/transport/static_metadata.h

@ -36,7 +36,7 @@
#include <grpc/census.h>
#define GRPC_CENSUS_MAX_ON_THE_WIRE_TAG_BYTES 4096
#define GRPC_CENSUS_MAX_ON_THE_WIRE_TAG_BYTES 2048
/* census_context is the in-memory representation of information needed to
* maintain tracing, RPC statistics and resource usage information. */

@ -70,7 +70,7 @@ typedef struct {
int success;
} completed_request;
#define MAX_SEND_EXTRA_METADATA_COUNT 4
#define MAX_SEND_EXTRA_METADATA_COUNT 3
/* Status data for a request can come from several sources; this
enumerates them all, and acts as a priority sorting for which

@ -40,7 +40,6 @@
#include <grpc/support/log.h>
#include <grpc/support/string_util.h>
#include "src/core/census/context.h"
#include "src/core/client_config/resolver_registry.h"
#include "src/core/iomgr/iomgr.h"
#include "src/core/support/string.h"
@ -168,7 +167,7 @@ static grpc_call *grpc_channel_create_call_internal(
grpc_channel *channel, grpc_call *parent_call, gpr_uint32 propagation_mask,
grpc_completion_queue *cq, grpc_mdelem *path_mdelem,
grpc_mdelem *authority_mdelem, gpr_timespec deadline) {
grpc_mdelem *send_metadata[3];
grpc_mdelem *send_metadata[2];
size_t num_metadata = 0;
GPR_ASSERT(channel->is_client);
@ -180,16 +179,6 @@ static grpc_call *grpc_channel_create_call_internal(
send_metadata[num_metadata++] = GRPC_MDELEM_REF(channel->default_authority);
}
if (propagation_mask & GRPC_PROPAGATE_CENSUS_TRACING_CONTEXT) {
char buf[GRPC_CENSUS_MAX_ON_THE_WIRE_TAG_BYTES];
size_t len = census_context_serialize(
census_context_current(), buf, GRPC_CENSUS_MAX_ON_THE_WIRE_TAG_BYTES);
if (len > 0) {
grpc_mdelem *census_mdelem = grpc_mdelem_from_metadata_strings(
GRPC_MDSTR_CENSUS, grpc_mdstr_from_buffer((gpr_uint8 *)buf, len));
send_metadata[num_metadata++] = census_mdelem;
}
}
return grpc_call_create(channel, parent_call, propagation_mask, cq, NULL,
send_metadata, num_metadata, deadline);
}

@ -33,11 +33,11 @@
* WARNING: Auto-generated code.
*
* To make changes to this file, change
*tools/codegen/core/gen_static_metadata.py,
* tools/codegen/core/gen_static_metadata.py,
* and then re-run it.
*
* See metadata.h for an explanation of the interface here, and metadata.c for
*an
* an
* explanation of what's going on.
*/

Loading…
Cancel
Save