Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion source/common/common/perf_annotation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void PerfOperation::record(absl::string_view category, absl::string_view descrip

// The ctor is explicitly declared private to encourage clients to use getOrCreate(), at
// least for now. Given that it's declared it must be instantiated. It's not inlined
// because the contructor is non-trivial due to the contained unordered_map.
// because the constructor is non-trivial due to the contained unordered_map.
PerfAnnotationContext::PerfAnnotationContext() {}

void PerfAnnotationContext::record(std::chrono::nanoseconds duration, absl::string_view category,
Expand Down
4 changes: 2 additions & 2 deletions source/common/http/conn_manager_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ void ConnectionManagerImpl::ActiveStream::decodeData(ActiveStreamDecoderFilter*
for (; entry != decoder_filters_.end(); entry++) {
// If end_stream_ is marked for a filter, the data is not for this filter and filters after.
//
// In following case, ActiveStreamFilterBase::commonContine() could be called recursively and
// In following case, ActiveStreamFilterBase::commonContinue() could be called recursively and
// its doData() is called with wrong data.
//
// There are 3 decode filters and "wrapper" refers to ActiveStreamFilter object.
Expand Down Expand Up @@ -1786,7 +1786,7 @@ bool ConnectionManagerImpl::ActiveStreamDecoderFilter::recreateStream() {
HeaderMapPtr request_headers(std::move(parent_.request_headers_));
StreamEncoder* response_encoder = parent_.response_encoder_;
parent_.response_encoder_ = nullptr;
// This functionally deletes the stream (via defered delete) so do not
// This functionally deletes the stream (via deferred delete) so do not
// reference anything beyond this point.
parent_.connection_manager_.doEndStream(this->parent_);

Expand Down
4 changes: 2 additions & 2 deletions source/common/http/http1/codec_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ void StreamEncoderImpl::encodeHeaders(const HeaderMap& headers, bool end_stream)
Headers::get().TransferEncoding.get().size(),
Headers::get().TransferEncodingValues.Chunked.c_str(),
Headers::get().TransferEncodingValues.Chunked.size());
// We do not aply chunk encoding for HTTP upgrades.
// We do not apply chunk encoding for HTTP upgrades.
// If there is a body in a WebSocket Upgrade response, the chunks will be
// passed through via maybeDirectDispatch so we need to avoid appending
// extra chunk boundaries.
Expand All @@ -133,7 +133,7 @@ void StreamEncoderImpl::encodeHeaders(const HeaderMap& headers, bool end_stream)

void StreamEncoderImpl::encodeData(Buffer::Instance& data, bool end_stream) {
// end_stream may be indicated with a zero length data buffer. If that is the case, so not
// atually write the zero length buffer out.
// actually write the zero length buffer out.
if (data.length() > 0) {
if (chunk_encoding_) {
connection_.buffer().add(fmt::format("{:x}\r\n", data.length()));
Expand Down
2 changes: 1 addition & 1 deletion source/common/json/json_loader.cc
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ class Field : public Object {
* Custom stream to allow access to the line number for each object.
*/
class LineCountingStringStream : public rapidjson::StringStream {
// Ch is typdef in parent class to handle character encoding.
// Ch is typedef in parent class to handle character encoding.
public:
LineCountingStringStream(const Ch* src) : rapidjson::StringStream(src), line_number_(1) {}
Ch Take() {
Expand Down
2 changes: 1 addition & 1 deletion source/common/network/address_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ Api::SysCallIntResult Ipv6Instance::connect(int fd) const {

int Ipv6Instance::socket(SocketType type) const {
const int fd = socketFromSocketType(type);
// Setting IPV6_V6ONLY resticts the IPv6 socket to IPv6 connections only.
// Setting IPV6_V6ONLY restricts the IPv6 socket to IPv6 connections only.
const int v6only = ip_.v6only_;
RELEASE_ASSERT(::setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &v6only, sizeof(v6only)) != -1, "");
return fd;
Expand Down
2 changes: 1 addition & 1 deletion source/common/network/dns_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void DnsResolverImpl::onAresSocketStateChange(int fd, int read, int write) {
ActiveDnsQuery* DnsResolverImpl::resolve(const std::string& dns_name,
DnsLookupFamily dns_lookup_family, ResolveCb callback) {
// TODO(hennna): Add DNS caching which will allow testing the edge case of a
// failed initial call to getHostbyName followed by a synchronous IPv4
// failed initial call to getHostByName followed by a synchronous IPv4
// resolution.
std::unique_ptr<PendingResolution> pending_resolution(
new PendingResolution(callback, dispatcher_, channel_, dns_name));
Expand Down
4 changes: 2 additions & 2 deletions source/common/network/utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ void Utility::throwWithMalformedIp(const std::string& ip_address) {
}

// TODO(hennna): Currently getLocalAddress does not support choosing between
// multiple interfaces and addresses not returned by getifaddrs. In additon,
// multiple interfaces and addresses not returned by getifaddrs. In addition,
// the default is to return a loopback address of type version. This function may
// need to be updated in the future. Discussion can be found at Github issue #939.
Address::InstanceConstSharedPtr Utility::getLocalAddress(const Address::IpVersion version) {
Expand Down Expand Up @@ -227,7 +227,7 @@ Address::InstanceConstSharedPtr Utility::getLocalAddress(const Address::IpVersio
freeifaddrs(ifaddr);
}

// If the local address is not found above, then return the loopback addresss by default.
// If the local address is not found above, then return the loopback address by default.
if (ret == nullptr) {
if (version == Address::IpVersion::v4) {
ret.reset(new Address::Ipv4Instance("127.0.0.1"));
Expand Down
2 changes: 1 addition & 1 deletion source/common/router/retry_state_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ bool RetryStateImpl::wouldRetryFromReset(const Http::StreamResetReason& reset_re
bool RetryStateImpl::wouldRetry(const Http::HeaderMap* response_headers,
const absl::optional<Http::StreamResetReason>& reset_reason) {
// First check "never retry" conditions so we can short circuit, then delegate to
// helper methods for checks dependant on retry policy.
// helper methods for checks dependent on retry policy.

// we never retry if the reset reason is overflow.
if (reset_reason && reset_reason.value() == Http::StreamResetReason::Overflow) {
Expand Down
2 changes: 1 addition & 1 deletion source/common/stats/symbol_table_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ Symbol SymbolTable::toSymbol(absl::string_view sv) {
// We create the actual string, place it in the decode_map_, and then insert
// a string_view pointing to it in the encode_map_. This allows us to only
// store the string once. We use unique_ptr so copies are not made as
// flat_hash_map moves values arond.
// flat_hash_map moves values around.
auto str = std::make_unique<std::string>(std::string(sv));
auto encode_insert = encode_map_.insert({*str, SharedSymbol(next_symbol_)});
ASSERT(encode_insert.second);
Expand Down
4 changes: 2 additions & 2 deletions source/common/stats/thread_local_store.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ Gauge& ThreadLocalStoreImpl::ScopeImpl::gauge(const std::string& name) {
// Note that we can do map.find(final_name.c_str()), but we cannot do
// map[final_name.c_str()] as the char*-keyed maps would then save the pointer to
// a temporary, and address sanitization errors would follow. Instead we must
// do a find() first, using tha if it succeeds. If it fails, then after we
// do a find() first, using that if it succeeds. If it fails, then after we
// construct the stat we can insert it into the required maps.
std::string final_name = prefix_ + name;
if (parent_.rejects(final_name)) {
Expand Down Expand Up @@ -366,7 +366,7 @@ Histogram& ThreadLocalStoreImpl::ScopeImpl::histogram(const std::string& name) {
// Note that we can do map.find(final_name.c_str()), but we cannot do
// map[final_name.c_str()] as the char*-keyed maps would then save the pointer to
// a temporary, and address sanitization errors would follow. Instead we must
// do a find() first, using tha if it succeeds. If it fails, then after we
// do a find() first, using that if it succeeds. If it fails, then after we
// construct the stat we can insert it into the required maps.
std::string final_name = prefix_ + name;
if (parent_.rejects(final_name)) {
Expand Down
12 changes: 6 additions & 6 deletions source/common/upstream/load_balancer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static const std::string RuntimePanicThreshold = "upstream.healthy_panic_thresho
// @param per_priority_availability the percentage availability of each priority, used to determine
// how much load each priority can handle.
// @param total_load the amount of load that may be distributed. Will be updated with the amount of
// load reminaining after distribution.
// load remaining after distribution.
// @param normalized_total_availability the total availability, up to a max of 100. Used to
// scale the load when the total availability is less than 100%.
// @return the first available priority and the remaining load
Expand Down Expand Up @@ -93,7 +93,7 @@ LoadBalancerBase::LoadBalancerBase(const PrioritySet& priority_set, ClusterStats
recalculatePerPriorityState(host_set->priority(), priority_set_, per_priority_load_,
per_priority_health_, per_priority_degraded_);
}
// Reclaculate panic mode for all levels.
// Recalculate panic mode for all levels.
recalculatePerPriorityPanic();

priority_set_.addPriorityUpdateCb(
Expand All @@ -116,7 +116,7 @@ LoadBalancerBase::LoadBalancerBase(const PrioritySet& priority_set, ClusterStats
// Do not enter panic mode, even if a specific priority has low number of healthy hosts.
// - normalized total health is < 100%. There are not enough healthy hosts to handle the load.
// Continue
// distibuting the load among priority sets, but turn on panic mode for a given priority
// distributing the load among priority sets, but turn on panic mode for a given priority
// if # of healthy hosts in priority set is low.
// - normalized total health is 0%. All hosts are down. Redirect 100% of traffic to P=0 and enable
// panic mode.
Expand All @@ -140,7 +140,7 @@ void LoadBalancerBase::recalculatePerPriorityState(uint32_t priority,
// Each priority level's health is ratio of healthy hosts to total number of hosts in a priority
// multiplied by overprovisioning factor of 1.4 and capped at 100%. It means that if all
// hosts are healthy that priority's health is 100%*1.4=140% and is capped at 100% which results
// in 100%. If 80% of hosts are healty, that priority's health is still 100% (80%*1.4=112% and
// in 100%. If 80% of hosts are healthy, that priority's health is still 100% (80%*1.4=112% and
// capped at 100%).
per_priority_health.get()[priority] =
std::min<uint32_t>(100, (host_set.overprovisioningFactor() *
Expand Down Expand Up @@ -330,7 +330,7 @@ void ZoneAwareLoadBalancerBase::regenerateLocalityRoutingStructures() {
// half the hosts in all host sets go unhealthy, this priority set will
// still send half of the incoming load to the local locality and 80% to residual.
//
// Basically, fariness across localities within a priority is guaranteed. Fairness across
// Basically, fairness across localities within a priority is guaranteed. Fairness across
// localities across priorities is not.
STACK_ARRAY(local_percentage, uint64_t, num_localities);
calculateLocalityPercentage(localHostSet().healthyHostsPerLocality(), local_percentage.begin());
Expand Down Expand Up @@ -439,7 +439,7 @@ HostConstSharedPtr LoadBalancerBase::chooseHost(LoadBalancerContext* context) {
}
}

// If we didnt find anything, return the last host.
// If we didn't find anything, return the last host.
return host;
}

Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/load_balancer_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ class EdfLoadBalancerBase : public ZoneAwareLoadBalancerBase {
};

/**
* A round roubin load balancer. When in weighted mode, EDF scheduling is used. When in not
* A round robin load balancer. When in weighted mode, EDF scheduling is used. When in not
* weighted mode, simple RR index selection is used.
*/
class RoundRobinLoadBalancer : public EdfLoadBalancerBase {
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/ring_hash_lb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ RingHashLoadBalancer::Ring::Ring(
absl::string_view hash_key(hash_key_buffer, total_hash_key_len);

// Sadly std::hash provides no mechanism for hashing arbitrary bytes so we must copy here.
// xxHash is done wihout copies.
// xxHash is done without copies.
const uint64_t hash =
use_std_hash
? std::hash<std::string>()(std::string(hash_key))
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/subset_lb.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ HostConstSharedPtr SubsetLoadBalancer::tryChooseHostFromContext(LoadBalancerCont
}

// Iterates over the given metadata match criteria (which must be lexically sorted by key) and find
// a matching LbSubsetEnryPtr, if any.
// a matching LbSubsetEntryPtr, if any.
SubsetLoadBalancer::LbSubsetEntryPtr SubsetLoadBalancer::findSubset(
const std::vector<Router::MetadataMatchCriterionConstSharedPtr>& match_criteria) {
const LbSubsetMap* subsets = &subsets_;
Expand Down
2 changes: 1 addition & 1 deletion source/common/upstream/upstream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ ClusterInfoImpl::ClusterInfoImpl(const envoy::api::v2::Cluster& config,
case envoy::api::v2::Cluster::ORIGINAL_DST_LB:
if (config.type() != envoy::api::v2::Cluster::ORIGINAL_DST) {
throw EnvoyException(fmt::format(
"cluster: LB type 'original_dst_lb' may only be used with cluser type 'original_dst'"));
"cluster: LB type 'original_dst_lb' may only be used with cluster type 'original_dst'"));
}
lb_type_ = LoadBalancerType::OriginalDst;
break;
Expand Down
2 changes: 1 addition & 1 deletion source/exe/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ int main(int argc, char** argv) {
}

// Run the server listener loop outside try/catch blocks, so that unexpected exceptions
// show up as a core-dumps for easier diagnostis.
// show up as a core-dumps for easier diagnostics.
return main_common->run() ? EXIT_SUCCESS : EXIT_FAILURE;
}
2 changes: 1 addition & 1 deletion source/extensions/filters/http/jwt_authn/extractor.cc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace JwtAuthn {
namespace {

/**
* Contant values
* Constant values
*/
struct JwtConstValueStruct {
// The header value prefix for Authorization.
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/http/squash/squash_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ void SquashFilter::onCreateAttachmentFailure(Http::AsyncClient::FailureReason) {
bool request_created = in_flight_request_ != nullptr;
in_flight_request_ = nullptr;

// No retries here, as we couldnt create the attachment object.
// No retries here, as we couldn't create the attachment object.
if (request_created) {
// Cleanup not needed if onFailure called inline in async client send, as this means that
// decodeHeaders is down the stack and will return Continue.
Expand Down
2 changes: 1 addition & 1 deletion source/extensions/filters/network/ext_authz/ext_authz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ void Filter::callCheck() {
Network::FilterStatus Filter::onData(Buffer::Instance&, bool /* end_stream */) {
if (status_ == Status::NotStarted) {
// By waiting to invoke the check at onData() the call to authorization service will have
// sufficient information to fillout the checkRequest_.
// sufficient information to fill out the checkRequest_.
callCheck();
}
return filter_return_ == FilterReturn::Stop ? Network::FilterStatus::StopIteration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ FilterStatus Router::transportEnd() {

FilterStatus Router::messageBegin(MessageMetadataSharedPtr metadata) {
// TODO(zuercher): route stats (e.g., no_route, no_cluster, upstream_rq_maintenance_mode, no
// healtthy upstream)
// healthy upstream)

route_ = callbacks_->route();
if (!route_) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ void ThriftMapValueImpl::delegateComplete() {
return;
}

// Prepare for any elements's value.
// Prepare for any element's value.
auto& elem = elements_.back();
if (elem.second == nullptr) {
auto value = makeValue(this, elem_type_);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ bool PreviousPrioritiesRetryPriority::adjustForAttemptedPriorities(
}

// If total availability is still zero at this point, it must mean that all clusters are
// completely unavailable. If so, fall back to using the original priority loads. This mantains
// completely unavailable. If so, fall back to using the original priority loads. This maintains
// whatever handling the default LB uses when all priorities are unavailable.
if (total_availability == 0) {
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ void MetricsServiceSink::flush(Stats::Source& source) {
}

grpc_metrics_streamer_->send(message_);
// for perf reasons, clear the identifer after the first flush.
// for perf reasons, clear the identifier after the first flush.
if (message_.has_identifier()) {
message_.clear_identifier();
}
Expand Down
Loading