[fixup] EventEngine Nomenclature (#32195)

pull/32206/head
AJ Heller 2 years ago committed by GitHub
parent fa5a6c42a6
commit 6a92df7237
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      BUILD
  2. 2
      include/grpc/event_engine/slice_buffer.h
  3. 2
      src/core/ext/filters/client_channel/channel_connectivity.cc
  4. 2
      src/core/lib/channel/promise_based_filter.h
  5. 8
      src/core/lib/event_engine/posix.h
  6. 2
      src/core/lib/event_engine/posix_engine/ev_poll_posix.cc
  7. 2
      src/core/lib/event_engine/posix_engine/posix_endpoint.h
  8. 2
      src/core/lib/event_engine/posix_engine/posix_engine.cc
  9. 10
      src/core/lib/event_engine/posix_engine/posix_engine.h
  10. 6
      src/core/lib/event_engine/posix_engine/posix_engine_listener_utils.h
  11. 2
      src/core/lib/event_engine/windows/windows_engine.h
  12. 4
      src/core/lib/slice/slice.h
  13. 2
      src/core/lib/slice/slice_buffer.h
  14. 2
      src/core/lib/transport/handshaker.h
  15. 6
      test/core/event_engine/event_engine_test_utils.h
  16. 2
      test/core/event_engine/fuzzing_event_engine/fuzzing_event_engine.cc
  17. 2
      test/core/event_engine/test_suite/posix/BUILD
  18. 2
      test/core/event_engine/test_suite/posix/oracle_event_engine_posix.h
  19. 2
      test/core/promise/sleep_test.cc
  20. 6
      test/cpp/microbenchmarks/bm_event_engine_run.cc
  21. 2
      tools/distrib/fix_build_deps.py

@ -1273,7 +1273,7 @@ grpc_cc_library(
] +
# TODO(vigneshbabu): remove these
# These headers used to be vended by this target, but they have to be
# removed after landing event engine.
# removed after landing EventEngine.
[
"//src/core:lib/iomgr/event_engine_shims/closure.cc",
"//src/core:lib/iomgr/event_engine_shims/endpoint.cc",
@ -1364,7 +1364,7 @@ grpc_cc_library(
] +
# TODO(vigneshbabu): remove these
# These headers used to be vended by this target, but they have to be
# removed after landing event engine.
# removed after landing EventEngine.
[
"//src/core:lib/iomgr/event_engine_shims/closure.h",
"//src/core:lib/iomgr/event_engine_shims/endpoint.h",

@ -48,7 +48,7 @@ namespace experimental {
///
/// The SliceBuffer API is basically a replica of the grpc_slice_buffer's,
/// and its documentation will move here once we remove the C structure,
/// which should happen before the Event Engine's API is no longer
/// which should happen before the EventEngine's API is no longer
/// an experimental API.
class SliceBuffer {
public:

@ -236,7 +236,7 @@ class StateWatcher : public DualRefCounted<StateWatcher> {
grpc_closure on_complete_;
// timer_handle_ might be accessed in parallel from multiple threads, e.g.
// timer callback fired immediately on an event engine thread before
// timer callback fired immediately on an EventEngine thread before
// RunAfter() returns.
absl::Mutex mu_;
absl::optional<grpc_event_engine::experimental::EventEngine::TaskHandle>

@ -119,7 +119,7 @@ class ChannelFilter {
}
private:
// TODO(ctiller): remove once per-channel-stack event engines land
// TODO(ctiller): remove once per-channel-stack EventEngines land
std::shared_ptr<grpc_event_engine::experimental::EventEngine> event_engine_ =
grpc_event_engine::experimental::GetDefaultEventEngine();
};

@ -30,7 +30,7 @@
namespace grpc_event_engine {
namespace experimental {
/// This defines an interface that posix specific event engines endpoints
/// This defines an interface that posix specific EventEngines endpoints
/// may implement to support additional file descriptor related functionality.
class PosixEndpointWithFdSupport : public EventEngine::Endpoint {
public:
@ -52,7 +52,7 @@ class PosixEndpointWithFdSupport : public EventEngine::Endpoint {
on_release_fd) = 0;
};
/// Defines an interface that posix event engine listeners may implement to
/// Defines an interface that posix EventEngine listeners may implement to
/// support additional file descriptor related functionality.
class PosixListenerWithFdSupport : public EventEngine::Listener {
public:
@ -98,7 +98,7 @@ class PosixListenerWithFdSupport : public EventEngine::Listener {
virtual void ShutdownListeningFds() = 0;
};
/// Defines an interface that posix event engines may implement to
/// Defines an interface that posix EventEngines may implement to
/// support additional file descriptor related functionality.
class PosixEventEngineWithFdSupport : public EventEngine {
public:
@ -118,7 +118,7 @@ class PosixEventEngineWithFdSupport : public EventEngine {
/// new client connection.
/// \a is_external - A boolean indicating whether the new client connection
/// is accepted by an external listener_fd or by a listener_fd that is
/// managed by the event engine listener.
/// managed by the EventEngine listener.
/// \a memory_allocator - The callback may use the provided memory
/// allocator to handle memory allocation operations.
/// \a pending_data - If specified, it holds any pending data that may have

@ -713,7 +713,7 @@ Poller::WorkResult PollPoller::Work(
// well instead of crashing. This is because the poller::Work is called
// right after an event enging is constructed. Even if phony poll is
// expected to be used, we dont want to check for it until some actual
// event handles are registered. Otherwise the event engine construction
// event handles are registered. Otherwise the EventEngine construction
// may crash.
r = poll(pfds, pfd_count, timeout_ms);
} else {

@ -703,7 +703,7 @@ class PosixEndpoint : public PosixEndpointWithFdSupport {
// Create a PosixEndpoint.
// A shared_ptr of the EventEngine is passed to the endpoint to ensure that
// the event engine is alive for the lifetime of the endpoint. The ownership
// the EventEngine is alive for the lifetime of the endpoint. The ownership
// of the EventHandle is transferred to the endpoint.
std::unique_ptr<PosixEndpoint> CreatePosixEndpoint(
EventHandle* handle, PosixEngineClosure* on_shutdown,

@ -367,7 +367,7 @@ void PosixEventEngine::PollerWorkInternal(
});
});
if (result == Poller::WorkResult::kDeadlineExceeded) {
// The event engine is not shutting down but the next asynchronous
// The EventEngine is not shutting down but the next asynchronous
// PollerWorkInternal did not get scheduled. Schedule it now.
executor->Run([poller_manager = std::move(poller_manager)]() {
PollerWorkInternal(poller_manager);

@ -96,7 +96,7 @@ class AsyncConnect {
};
// A helper class to manager lifetime of the poller associated with the
// posix event engine.
// posix EventEngine.
class PosixEnginePollerManager
: public grpc_event_engine::experimental::Scheduler {
public:
@ -131,7 +131,7 @@ class PosixEnginePollerManager
// An iomgr-based Posix EventEngine implementation.
// All methods require an ExecCtx to already exist on the thread's stack.
// TODO(ctiller): KeepsGrpcInitialized is an interim measure to ensure that
// event engine is shut down before we shut down iomgr.
// EventEngine is shut down before we shut down iomgr.
class PosixEventEngine final : public PosixEventEngineWithFdSupport,
public grpc_core::KeepsGrpcInitialized {
public:
@ -152,7 +152,7 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport,
};
#ifdef GRPC_POSIX_SOCKET_TCP
// Constructs an event engine which does not own the poller. Do not call this
// Constructs an EventEngine which does not own the poller. Do not call this
// constructor directly. Instead use the MakeTestOnlyPosixEventEngine static
// method. Its expected to be used only in tests.
explicit PosixEventEngine(
@ -201,10 +201,10 @@ class PosixEventEngine final : public PosixEventEngineWithFdSupport,
bool Cancel(TaskHandle handle) override;
#ifdef GRPC_POSIX_SOCKET_TCP
// The posix event engine returned by this method would not own the poller
// The posix EventEngine returned by this method would not own the poller
// and would not be in-charge of driving the poller by calling its Work(..)
// method. Instead its upto the test to drive the poller. The returned posix
// event engine will also not attempt to shutdown the poller since it does not
// EventEngine will also not attempt to shutdown the poller since it does not
// own it.
static std::shared_ptr<PosixEventEngine> MakeTestOnlyPosixEventEngine(
grpc_event_engine::experimental::PosixEventPoller* test_only_poller) {

@ -25,10 +25,10 @@
namespace grpc_event_engine {
namespace experimental {
// This interface exists to allow different Event Engines to implement different
// This interface exists to allow different EventEngines to implement different
// custom interception operations while a socket is Appended. The
// listener util functions are defined over this interface and thus can be
// shared across multiple event engines.
// shared across multiple EventEngines.
class ListenerSocketsContainer {
public:
struct ListenerSocket {
@ -55,7 +55,7 @@ class ListenerSocketsContainer {
virtual ~ListenerSocketsContainer() = default;
};
// Creates and configures a socket to be used by the Event Engine Listener. The
// Creates and configures a socket to be used by the EventEngine Listener. The
// type of the socket to create is determined by the by the passed address. The
// socket configuration is specified by passed tcp options. If successful, it
// returns a ListenerSocketsContainer::ListenerSocket type which holds the

@ -41,7 +41,7 @@ namespace grpc_event_engine {
namespace experimental {
// TODO(ctiller): KeepsGrpcInitialized is an interim measure to ensure that
// event engine is shut down before we shut down iomgr.
// EventEngine is shut down before we shut down iomgr.
class WindowsEventEngine : public EventEngine,
public grpc_core::KeepsGrpcInitialized {
public:

@ -47,9 +47,9 @@
// MutableSlice - provides a guarantee of unique ownership, meaning the
// underlying data can be mutated safely.
// This slice implementation is an extension of the event engine Slice
// This slice implementation is an extension of the EventEngine Slice
// implementation defined in <grpc/event_engine/slice.h>. Changes to this
// implementation might warrant changes to the public event engine Slice
// implementation might warrant changes to the public EventEngine Slice
// type as well.
namespace grpc_core {

@ -40,7 +40,7 @@ namespace grpc_core {
///
/// The SliceBuffer API is basically a replica of the grpc_slice_buffer's,
/// and its documentation will move here once we remove the C structure,
/// which should happen before the Event Engine's API is no longer
/// which should happen before the EventEngine's API is no longer
/// an experimental API.
class SliceBuffer {
public:

@ -75,7 +75,7 @@ struct HandshakerArgs {
// individual handshakers.
void* user_data = nullptr;
// Deadline associated with the handshake.
// TODO(anramach): Move this out of handshake args after event engine
// TODO(anramach): Move this out of handshake args after EventEngine
// is the default.
Timestamp deadline;
};

@ -45,7 +45,7 @@ std::string ExtractSliceBufferIntoString(SliceBuffer* buf);
// Returns a random message with bounded length.
std::string GetNextSendMessage();
// Waits until the use_count of the event engine shared_ptr has reached 1
// Waits until the use_count of the EventEngine shared_ptr has reached 1
// and returns.
void WaitForSingleOwner(std::shared_ptr<EventEngine>&& engine);
@ -59,8 +59,8 @@ absl::Status SendValidatePayload(absl::string_view data,
EventEngine::Endpoint* receive_endpoint);
// A helper class to create clients/listeners and connections between them.
// The clients and listeners can be created by the oracle event engine
// or the event engine under test. The class provides handles into the
// The clients and listeners can be created by the oracle EventEngine
// or the EventEngine under test. The class provides handles into the
// connections that are created. Inidividual tests can test expected behavior by
// exchanging arbitrary data over these connections.
class ConnectionManager {

@ -53,7 +53,7 @@ FuzzingEventEngine::FuzzingEventEngine(
// epoch to allow for some fancy atomic stuff.
now_ = Time() + std::chrono::seconds(5);
// Whilst a fuzzing event engine is active we override grpc's now function.
// Whilst a fuzzing EventEngine is active we override grpc's now function.
grpc_core::TestOnlySetProcessEpoch(NowAsTimespec(GPR_CLOCK_MONOTONIC));
auto update_delay = [](std::map<intptr_t, Duration>* map,

@ -45,7 +45,7 @@ grpc_cc_test(
"no_test_ios",
"no_windows",
],
# TODO(vignesbabu): This is required because the oracle event engine uses
# TODO(vignesbabu): This is required because the oracle EventEngine uses
# poll syscall. If uses_polling is set to False, there will be an attempt
# to run this test with GRPC_POLL_STRATEGY=none which will hijack the poll
# c-wrapper causing the test to fail. A more generic posix oracle event

@ -144,7 +144,7 @@ class PosixOracleListener : public EventEngine::Listener {
std::vector<int> listener_fds_;
};
// A posix based oracle event engine.
// A posix based oracle EventEngine.
class PosixOracleEventEngine final : public EventEngine {
public:
PosixOracleEventEngine() = default;

@ -87,7 +87,7 @@ TEST(Sleep, OverlyEagerEventEngine) {
EXPECT_NE(wakeup, nullptr);
EXPECT_FALSE(done);
// Schedule the wakeup instantaneously - It won't have passed the scheduled
// time yet, but sleep should believe the event engine.
// time yet, but sleep should believe the EventEngine.
wakeup->Run();
EXPECT_TRUE(done);
}

@ -101,9 +101,9 @@ void BM_EventEngine_RunClosure(benchmark::State& state) {
grpc_core::Notification* signal = new grpc_core::Notification();
std::atomic_int count{0};
// Ignore leaks from this closure. For simplicty, this closure is not deleted
// because the closure may still be executing after the event engine is
// destroyed. This is because the default posix event engine's thread pool may
// get destroyed separately from the event engine.
// because the closure may still be executing after the EventEngine is
// destroyed. This is because the default posix EventEngine's thread pool may
// get destroyed separately from the EventEngine.
AnyInvocableClosure* closure = absl::IgnoreLeak(
new AnyInvocableClosure([signal_holder = &signal, cb_count, &count]() {
if (++count == cb_count) {

@ -541,7 +541,7 @@ def make_library(library):
hdrs = sorted(consumes[library])
# we need a little trickery here since grpc_base has channel.cc, which calls grpc_init
# which is in grpc, which is illegal but hard to change
# once event engine lands we can clean this up
# once EventEngine lands we can clean this up
deps = Choices(library, {'//:grpc_base': ['//:grpc', '//:grpc_unsecure']}
if library.startswith('//test/') else {})
external_deps = Choices(None, {})

Loading…
Cancel
Save