Skip to content
Open
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 thrift/annotation/rust.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ struct NewType {}
*
* "Codegen" errors or bugs resulting from the use of standard types in valid
* positions in `@rust.Type` annotations should be considered the responsibility
* of the the Rust Thrift maintainers to address. Less "formal" support should
* of the Rust Thrift maintainers to address. Less "formal" support should
* be expected from the Rust Thrift maintainers when nonstandard types are
* involved.
*
Expand Down
2 changes: 1 addition & 1 deletion thrift/annotation/thrift.thrift
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ enum RpcPriority {
* In practice, this means that this type is safe to use as a map key type or as
* a set element type, but any change to its schema (including changes that are
* "typically" considered safe, such as adding a new field) MAY break backwards
* compatiblity.
* compatibility.
*
* Note that the tooling and environment in which Thrift IDL definitions live
* (such as code repositories) may not be explicitly preventing such changes:
Expand Down
2 changes: 1 addition & 1 deletion thrift/compiler/ast/t_type.h
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ class t_type_ref final {
* resolution will be attempted from).
* `nullptr` if this type ref is empty, or already resolved.
* E.g. if a node in the program `foo` references a currently unresolved type
* `bar.Baz`, this will be a a pointer to the program `foo` (NOT `bar`).
* `bar.Baz`, this will be a pointer to the program `foo` (NOT `bar`).
*/
const t_program* unresolved_program_ = nullptr;
std::string unresolved_name_;
Expand Down
2 changes: 1 addition & 1 deletion thrift/compiler/sema/schematizer.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class schematizer {
enum class value_id : int64_t {};

struct options {
bool double_writes : 1; // Legacy copies of data for backward compatiblity.
bool double_writes : 1; // Legacy copies of data for backward compatibility.

bool include_annotations : 1;
bool include_docs : 1;
Expand Down
2 changes: 1 addition & 1 deletion thrift/compiler/source_location.cc
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ source_manager::path_or_error source_manager::find_include_file(
return source_manager::path_or_error{std::in_place_index<0>, itr->second};
}

// Convenience callback to use when the path the the include has been
// Convenience callback to use when the path the include has been
// succcessfully resolved: updates the set of known paths and returns a
// successful resutl with the resolved path.
auto new_found_include = [&](std::string path) {
Expand Down
2 changes: 1 addition & 1 deletion thrift/compiler/whisker/print_ast.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ std::string to_string(
resolved_location end = src_manager.resolve_location(loc.end);
// Format of a source location is:
// line:<line>:<column>
// If begin and end are on the same line, the the end source location is:
// If begin and end are on the same line, the end source location is:
// col:<column>
return fmt::format(
"<line:{}:{}, {}>",
Expand Down
2 changes: 1 addition & 1 deletion thrift/doc/contributions/whisker.md
Original file line number Diff line number Diff line change
Expand Up @@ -1493,7 +1493,7 @@ Use [`{{#let}}`](#let-statements), [`{{#import}}](#import-statements), `as` capt

### Derived Evaluation Context

Whisker renders `{{#let partial}}` blocks within a new evaluation context *derived* from the the call site. This context starts with an empty stack but retains access to the same global scope.
Whisker renders `{{#let partial}}` blocks within a new evaluation context *derived* from the call site. This context starts with an empty stack but retains access to the same global scope.

## Standalone Tags

Expand Down
2 changes: 1 addition & 1 deletion thrift/doc/features/any.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ The `type` field within the `AnyStruct` provides the `name` of the type and any
The Type Registry is a crucial component in the deserialization process of user-defined types stored in `AnyStruct`. It maintains a mapping from the universal name (stored in the `type` field) to its native generated type. This mapping allows the deserialization process to correctly interpret the data stored in AnyStruct and convert it back into its original user-defined type. The Thrift generated structs, which have a universal name provided, are registered in the TypeRegistry as part of the initialization code.

:::note
Type Registry is available in C++, Hack, Python and Java. In C++, you need to add a compiler option `any` in order to generate intialization code to register Thrift types.
Type Registry is available in C++, Hack, Python and Java. In C++, you need to add a compiler option `any` in order to generate initialization code to register Thrift types.
:::

### Protocol
Expand Down
2 changes: 1 addition & 1 deletion thrift/doc/glossary/kinds-of-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ possible native types can therefore be categorized as shown below.:

#### Default Target Types

Default target types are are the ones used by default by the Thrift compiler for
Default target types are the ones used by default by the Thrift compiler for
the corresponding target generated language. They are obviously supported by
Thrift, and are the ones used unless the user explicitly specifies otherwise
(typically, through annotations).
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp/Frozen.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* be written to disk, mmap'ed back, and used in-place without any
* deserialization.
*
* These types require that the the structure does not change between freeze and
* These types require that the structure does not change between freeze and
* thaw. Any versioning mismatches will lead to undefined behavior.
*
* To enable the necessary code generation for these types, enable the 'frozen'
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp/concurrency/PosixThreadFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ PthreadThread::PthreadThread(
}

PthreadThread::~PthreadThread() {
/* Nothing references this thread, if is is not detached, do a join
/* Nothing references this thread, if it is not detached, do a join
now, otherwise the thread-id and, possibly, other resources will
be leaked. */
if (!detached_) {
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp/test/loadgen/RNG.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ class RNG {
* This value is used to pick seeds for new thread-local RNGs.
* It won't affect thread-local RNGs that have already been created.
*
* Note that that the seed value used for each thread-local RNG depends on
* Note that the seed value used for each thread-local RNG depends on
* the order in which the thread-local RNGs are created. You may not get
* consistent results across runs if your threads are not initialized in a
* consistent order.
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp/transport/THttpClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ bool THttpClient::parseStatusLine(char* status) {
// code. Skip over it.
++code;

// RFC 2616 requires exactly 1 space between the the status code and reason
// RFC 2616 requires exactly 1 space between the status code and reason
// phrase.
const char* endCode = strchr(code, ' ');
if (endCode == nullptr) {
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp/util/VarintUtils-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ inline size_t readContiguousVarintMediumSlowU64BMI2(
size_t intBytes = (maskShift >> 3) + 1;

uint64_t mask = (1ULL << maskShift) - 1;
// You might think it would make more sense to to the pext first and mask
// You might think it would make more sense to do the pext first and mask
// afterwards (avoiding having two pexts in a single dependency chain at 3
// cycles / pop); this seems not to be borne out in microbenchmarks. The
// mask you need ends up being more complicated to compute.
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/frozen/Frozen.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ struct LayoutBase {
explicit LayoutBase(std::type_index _type) : type(std::move(_type)) {}

/**
* Internal: Updates the size of this structure according the the result of a
* Internal: Updates the size of this structure according to the result of a
* layout attempt. Returns true iff another pass of layout will be needed.
*/
bool resize(FieldPosition after, bool inlined);
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/frozen/FrozenUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ size_t frozenSize(const T& v) {

/**
* Returns an upper bound estimate of the number of bytes required to freeze
* this object with a given layout. Actual bytes required will depend on on
* this object with a given layout. Actual bytes required will depend on
* the alignment of the freeze buffer.
*/
template <class T>
Expand Down
4 changes: 2 additions & 2 deletions thrift/lib/cpp2/op/Get.h
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ FOLLY_ALWAYS_INLINE constexpr void for_each_ordinal(F&& f) {
std::forward<F>(f), std::make_integer_sequence<size_t, num_fields<T>>{});
}

/// Calls the given function with with ordinal<1> to ordinal<N>, returing the
/// Calls the given function with ordinal<1> to ordinal<N>, returning the
/// first 'true' result produced.
template <
typename T,
Expand Down Expand Up @@ -391,7 +391,7 @@ FOLLY_ALWAYS_INLINE constexpr void for_each_field_id_ascending(F&& f) {
std::forward<F>(f), std::make_integer_sequence<size_t, num_fields<T>>{});
}

/// Calls the given function with with each field_id<{id}>, returning the
/// Calls the given function with each field_id<{id}>, returning the
/// first 'true' result produced.
template <typename T, typename F>
decltype(auto) find_by_field_id(F&& f) {
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/protocol/detail/FieldMaskUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ void ensure_fields(MaskRef ref, type::AnyStruct& t) {
"Cannot ensure Any field (schemaless ensure is unsafe)");
}

// backwards compatiblity with field mask
// backwards compatibility with field mask
return ensure_fields<type::AnyStruct>(ref, t);
}

Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/server/DecoratorData.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ namespace apache::thrift::server {

/**
* This is the interface that Service Interceptor, Service handlers, and
* decorators will have access to to read and write from decorator data. put()
* decorators will have access to read and write from decorator data. put()
* is only usable from a non-const interface, whereas get() is usable from
* both const and non-const interfaces.
*/
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/server/ParallelConcurrencyController.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class ParallelConcurrencyController : public ParallelConcurrencyControllerBase {
/**
*
* @param requestExecutor: If set to RequestExecutor::Serial, the requests
* will be executed using a a folly::SerialExecutor. Consider using this if
* will be executed using a folly::SerialExecutor. Consider using this if
* your code uses coroutines.
*/
ParallelConcurrencyController(
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/server/ResourcePoolSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class ResourcePoolSet {
// frequently.
std::size_t workerCount() const;

// Returns the number of of idle threads in this ResourcePoolSet.
// Returns the number of idle threads in this ResourcePoolSet.
// This is inteded for reporting statistics and should not be called
// frequently.
std::size_t idleWorkerCount() const;
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/server/ServiceInterceptorBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ class ServiceInterceptorBase {

/**
* This methods is called by ThriftServer to set the module name for the
* interceptor. This method is expected to be called prior to to the
* interceptor. This method is expected to be called prior to the
* the interceptor methods being executed on any request, as it performs
* various secondary intitialization requiring module name to be known.
*/
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/server/ServiceInterceptorQualifiedName.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ namespace apache::thrift {

/**
* Service Interceptors are uniquely identified by
* {moduleName}.{interceptorName} at runtime. Module Name is the the name of
* {moduleName}.{interceptorName} at runtime. Module Name is the name of
* module that installed the interceptor, and Interceptor Name is the result
* of calling the getName() method on the interceptor.
*/
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/server/ThriftServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -3358,7 +3358,7 @@ class ThriftServer : public apache::thrift::concurrency::Runnable,
* then we schedule a task to dump the server's state to disk for
* investigation.
*
* The implementor of the dumping logic should provide the the task as well
* The implementor of the dumping logic should provide the task as well
* as an appropriate timeout -- we do not want to indefinitely block shutdown
* in case the task deadlocks.
*/
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/test/FrozenTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST(Frozen, Basic) {
auto* freezeResult = freeze(team, buffer);
const byte* const frozenLocation =
static_cast<const byte*>(static_cast<const void*>(freezeResult));
// verify that freeze didn't yeild a different address.
// verify that freeze didn't yield a different address.
EXPECT_EQ(freezeLocation - &bytes[0], frozenLocation - &bytes[0]);

std::vector<byte> copy(bytes);
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/test/ThriftObjectProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ DEFINE_string(type, "", "The type to profile.");
DEFINE_string(
protocol,
"Binary",
"The protocol used to to serialize/deserialize Protocol.Object/Value with");
"The protocol used to serialize/deserialize Protocol.Object/Value with");
DEFINE_string(impl, "protocol", "The implementation for Object");

template <
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/test/frozen1/FrozenTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TEST(Frozen, Basic) {
auto* freezeResult = freeze(team, buffer);
const byte* const frozenLocation =
static_cast<const byte*>(static_cast<const void*>(freezeResult));
// verify that freeze didn't yeild a different address.
// verify that freeze didn't yield a different address.
EXPECT_EQ(freezeLocation - &bytes[0], frozenLocation - &bytes[0]);

std::vector<byte> copy(bytes);
Expand Down
2 changes: 1 addition & 1 deletion thrift/lib/cpp2/transport/rocket/client/RequestContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class RequestContext {
};

enum class State : uint8_t {
DEFERRED_INIT, /* still needs to be intialized with server version */
DEFERRED_INIT, /* still needs to be initialized with server version */
WRITE_NOT_SCHEDULED,
WRITE_SCHEDULED,
WRITE_SENDING, /* AsyncSocket::writeChain() called, but WriteCallback has
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ CompressionAlgorithmSelector::toCodecTypeAndLevel(
// implementation details, folly segmented these negative ZSTD levels into
// a "ZSTD_FAST" codec type where positive levels are translated to
// negative levels for the underlying base codec. This magic "7" (-7 for
// the underlying base codec) was determined to to be sane by an internal
// the underlying base codec) was determined to be sane by an internal
// customer.
return {
folly::compression::CodecType::ZSTD_FAST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ RefactoredRocketServerConnection::RefactoredRocketServerConnection(
}
}

// To prevent a C++ intialization error we need to initialize the the observer
// To prevent a C++ initialization error we need to initialize the observer
// container after the vtable is fully created
this->initializeObserverContainer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ RocketServerConnection::RocketServerConnection(
}
}

// To prevent a C++ intialization error we need to initialize the the observer
// To prevent a C++ initialization error we need to initialize the observer
// container after the vtable is fully created
this->initializeObserverContainer();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ struct WriteBatch {

/**
* OutgoingFrameHandler receives Frames in batches in the handle method. It then
* schedules a a job on the event loop to process the frames up to the batch
* schedules a job on the event loop to process the frames up to the batch
* size. If it hits the current batch size it'll process them immediately rather
* than waiting, and rescheduling if there's frames left. This class is meant to
* only run on the event base threads and is *NOT* thread-safe. It's shared
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicLong;

/** NiftyMetrics to support backward compatibile in SPI while refactoring to Netty 4 */
/** NiftyMetrics to support backward compatible in SPI while refactoring to Netty 4 */
@Deprecated
public class SPINiftyMetrics implements NiftyMetrics {
private final AtomicInteger channelCount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import java.util.concurrent.ConcurrentHashMap;

/**
* This class is used to store meta data about thrift fields. Every field in a a struct should have
* This class is used to store meta data about thrift fields. Every field in a struct should have
* a corresponding instance of this class describing it.
*/
@SuppressWarnings("serial")
Expand Down
2 changes: 1 addition & 1 deletion thrift/test/OptionalsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ TEST(OptionalsTest, EqualityTests) {
// for each of the fields:
// * set a required field, expect equal.
// * set an optional field on one; expect not equal.
// * the the optional field on the other one; equal again.
// * the optional field on the other one; equal again.

// both completely empty
EXPECT_EQ(obj1, obj2);
Expand Down
2 changes: 1 addition & 1 deletion thrift/test/SerializationInFieldIdOrderTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ TEST(Foo, RoundTrip) {
EXPECT_EQ(CompactSerializer::deserialize<Foo>(s), foo);
EXPECT_EQ(CompactSerializer::deserialize<Foo2>(s2), foo2);

// Test backward/forward compatiblity
// Test backward/forward compatibility
EXPECT_EQ(CompactSerializer::deserialize<Foo>(s2), foo);
EXPECT_EQ(CompactSerializer::deserialize<Foo2>(s), foo2);
}
Expand Down
2 changes: 1 addition & 1 deletion thrift/test/fuzzer/RandomizerTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def test_seeded(self):
class TestIntRandomizer(TestRandomizer):
@classmethod
def _one_bit_flipped(cls, a, b):
"""Return true if a and b differ at at most one bit position"""
"""Return true if a and b differ at most one bit position"""
diff = a ^ b # Bits set to 1 where a and b differ
# If diff has only one `1` bit, subtracting one will clear that bit
# Otherwise, the most significant 1 will not be cleared
Expand Down