Mark D. Roth
ee900c0e39
ring_hash: fix subchannel list to not shutdown until picker is destroyed ( #30714 )
...
* ring_hash: fix subchannel list to not shutdown until picker is destroyed
* hop into WorkSerializer before unreffing subchannels
* use a weak ref for subchannel connectivity state watches
* Automated change: Fix sanity tests
* fix memory leak
* clang-format
* fix circular reference problem by moving ring into subchannel list
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
Yash Tibrewal
02df22f52f
FaultInjection: Fix random number generation ( #30623 )
...
* FaultInjection: Fix random number generation
* Put random generation under a mutex
* Fix IWYU
* Regenerate projects
* Modify timeouts
* Dbg build knobs
* Remove unnecessary slowdown factor
* Tune error tolerance and add note on broken computation of ComputeIdealNumRpcs
2 years ago
Craig Tiller
2a7286a67c
[sleep] Make this robust against poorly implemented event engines ( #30617 )
...
* [sleep] Make this robust against poorly implemented event engines
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
apolcyn
778f04dccf
Bump version on master branch to 1.50.0.dev ( #30614 )
...
* bump version to 1.50.0-dev
* regenerate projects
2 years ago
AJ Heller
d168917f77
Fix forkable globals ( #30608 )
2 years ago
apolcyn
0344ce4a3a
Bump core version ( #30588 )
...
* bump C-core version
* regenerate projects
2 years ago
AJ Heller
d025c1732f
Revert "Reland: Make GetDefaultEventEngine return a shared_ptr ( #30563 )" ( #30573 )
...
This reverts commit ee7c0a8e4c
.
2 years ago
Vignesh Babu
009dadbb74
Fork iomgr traced buffer list implementation for posix event engine ( #30539 )
...
* Forking iomgr internal_errqueue defines for posix event engine
* fix BUILD file
* start
* update
* sanity
* regenerate_projects
* Automated change: Fix sanity tests
* review comments
* review comments
* Automated change: Fix sanity tests
* fix BUILD
* add no_windows tag
* minor typo
* typo
* review comments
* regenerate projects
* fix BUILD issue
* iwyu fixes
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
Craig Tiller
468fe2d835
[promise] Add an optimization for promises of size <= sizeof(void*) ( #29835 )
...
* vtable phrasing
* small promise optimization
* fix
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
AJ Heller
ee7c0a8e4c
Reland: Make GetDefaultEventEngine return a shared_ptr ( #30563 )
...
* Reland: "Make GetDefaultEventEngine return a shared_ptr (#30280 )"
This reverts commit 45959e7cc1
.
* Attempted fix with NoDestruct
* Not a process-wide singleton for the type. Just a NonDestruct
* fix
2 years ago
Cheng-Yu Chung
543b290203
Build Target Reorganization Part 1 ( #30518 )
...
* Clean up gpr_base
* Remove `avoid_dep` for target `gpr`
* Add alias `gpr_base` for `gpr` for compatibility
* Fix tool error
* Update
* Remove temporary `gpr_base`
* Remove unused `alt_gpr_base_legacy`
2 years ago
WenTao Ou
3cea62f686
Fix compatibility for MSVC 19.32. (`fatal error C1001: Internal compiler error`) ( #30459 )
...
* Fix compatibility for MSVC 19.32. (`fatal error C1001: Internal compiler error`)
* Move `typename F, typename Arg, typename Iter` of `BasicSeqIter` into `typename IterTraits`
Signed-off-by: owentou <owentou@tencent.com>
* Keep just one template argument for `BasicSeqIter`
Signed-off-by: owentou <owentou@tencent.com>
* iwyu, fix_auto_deps, clang_format, buildifier format
Signed-off-by: owentou <owentou@tencent.com>
Co-authored-by: AJ Heller <hork@google.com>
2 years ago
AJ Heller
45959e7cc1
Revert "Make GetDefaultEventEngine return a shared_ptr ( #30280 )" ( #30558 )
...
This reverts commit 4df74f2b4c
.
2 years ago
AJ Heller
4df74f2b4c
Make GetDefaultEventEngine return a shared_ptr ( #30280 )
...
This works around valgrind memory leaks by giving EventEngines a fixed
lifetime. We eventually want ref-counted EventEngines internally, so this is
a step in the right direction as well.
2 years ago
Craig Tiller
1216b4734e
[promises] Use new NoDestruct type in Wakeup ( #30494 )
...
* fix
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
AJ Heller
0c5b6171ad
EventEngine Forkables ( #30473 )
...
A (currently) pthread_atfork-based fork support mechanism, allowing EventEngines - or any other object that wants to implement the Forkable interface - respond to forks.
2 years ago
AJ Heller
8f5300b95d
Rename the default EventEngine headers ( #30528 )
...
* Rename the default EventEngine headers
Small cleanup. This code hasn't been related to factories for a month or
two.
* ensure only one target contains default_event_engine.h
* src + hdr in same target
* include guards
2 years ago
Craig Tiller
4ec5d9eb55
[resource_quota] Custom controller ( #30457 )
...
* [resource_quota] Custom controller
Instead of a PID controller use a custom binary-search inspired controller that will eventually converge to a good control value.
Experiments have shown this able to successfully hold a 95% memory pressure, optimizing for performance most of the time, and gracefully restricting memory usage under severe pressure.
There will be further changes after this one to use the new control value in various systems.
* Automated change: Fix sanity tests
* Update memory_quota.cc
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
c866d65966
[promises] Eliminate switch.h ( #30317 )
...
* [promises] Eliminate switch.h
Instead build a jump table that we can index into and call the appropriate function. Means that the dispatch mechanism can be done in C++ without a code generator, and so eliminates a bunch of fiddly code.
* fix
* ensure static initialization
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
326a1fd8fd
[json] Try to not generate AutoLoader destructors ( #30501 )
2 years ago
Vignesh Babu
0b1a8c984b
Revert "Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args ( #30028 )" ( #30495 )
...
This reverts commit 2c977a4d98
.
2 years ago
Craig Tiller
15a81131a8
[c++] Add a non-destructed type ( #30491 )
...
* [c++] Add a non-destructed type
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
* comment
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Mark D. Roth
af634e19b4
Declarative JSON parser ( #30442 )
...
* Declarative JSON parser
* Automated change: Fix sanity tests
* fix
* shrinking stuff a little
* static vtables
* separate fns
* simpler?
* make maps work
* windows fixes
* Automated change: Fix sanity tests
* simplify code
* Automated change: Fix sanity tests
* vtable-test
* dont always create vec/map impls for every type
* comments
* make error consistent
* move method private
* progress
* durations!
* Automated change: Fix sanity tests
* fix
* fix
* fix
* Automated change: Fix sanity tests
* post-load
* Automated change: Fix sanity tests
* document JsonPostLoad() and add static_assert
* don't copy field names, to avoid length limitations
* use absl::Status
* accept either string or number for numeric values
* add test for direct data member of another struct type
* remove unused method
* add support for retaining part of the JSON wirthout processing
* update test for changes in Json::Parse() API
* add absl::optional support
* Automated change: Fix sanity tests
* fix tests, improve error messages, and add overload to parse to existing object
* remove overload of LoadFromJson()
* change special case for Json to instead use Json::Object
* fix build
* improve error structure, add missing types, and improve tests
* clang-format
* Automated change: Fix sanity tests
* fix build
* add LoadJsonObjectField(), add LoadFromJson() overload that takes an ErrorList parameter, and add tests for parsing bare top-level types
* fix msan
* Automated change: Fix sanity tests
* fix error message
* Automated change: Fix sanity tests
* add mechanism to conditionally disable individual fields
* fix build
Co-authored-by: Craig Tiller <craig.tiller@gmail.com>
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
Co-authored-by: Craig Tiller <ctiller@google.com>
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
AJ Heller
c752a6b25e
Reland: Windows IOCP implementation for the WindowsEventEngine ( #30480 )
...
Reverts #30466 , relanding #30389 . Requires a cherrypick.
2 years ago
Craig Tiller
a5cab10d6f
[load_balancing] Move interfaces to src/core/lib/load_balancing ( #30465 )
...
* [load_balancing] Move interfaces to src/core/lib/load_balancing
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Vignesh Babu
2c977a4d98
Modifying iomgr tcp code to use event engine EndpointConfig instead of channel_args ( #30028 )
...
* convert tcp code to use EndpointConfig and successfully compile
* regenerate projects
* copying config options used in tcp code to create map backed endpoint configs
* fix minor build issues
* fix includes in tests
* fix some build and test issues
* modifying endpoint config definition from an abstract interface into a concrete implementation
* minor fix
* add unreachable code check
* fix some windows build issues
* fix more build issues
* adding a grpc_tcp_generic_options struct to hold data extracted from EndpointConfig
* code formatting
* simplify
* fix sanity checks
* fix windows issues
* some posix fixes
* disabling copy constructor and copy assignment operator for endpoint config
* fix sanity checks
* fix syntax error
* fix weird formatting
* fix build issue
* fix review comments
* reverting un-necessary change
* remove channel args completely from windows impl since it is unused
* remove unused headers and fix usage in endpoint_pair_windows.cc
* cleanup
* cleanup
* fix some initialization issues
* re-generate projects
* removing some files
* fix ifdef for windows
* fixing windows build issue due to improper header file include
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
* review comments
* add comment
* review comments
* rename GetPointer to GetVoidPointer
* cleanup
* Automated change: Fix sanity tests
* removing EndpointConfig::Get method
* Automated change: Fix sanity tests
* minor fix
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
Craig Tiller
e008a6e8b7
[sleep] Rewrite to avoid bug ( #30471 )
...
* [sleep] Rewrite to avoid bug
* comments
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
AJ Heller
9d4e0e17fe
Revert "Windows IOCP implementation for the WindowsEventEngine ( #30389 )" ( #30466 )
...
This reverts commit 52402afdd4
.
2 years ago
Mark D. Roth
7fcb2e1229
outlier_detection LB: reset state when OD is disabled ( #30418 )
...
* outlier_detection LB: reset state when OD is disabled
* leave interval unset when no OD config is present
* Automated change: Fix sanity tests
* fix clang-tidy
* don't check for interval of infinite duration
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
AJ Heller
52402afdd4
Windows IOCP implementation for the WindowsEventEngine ( #30389 )
...
This is a partial fork of the windows iomgr code - specifically the IOCP and Socket pieces - with some improved architecture and encapsulation. And the start of a WindowsEventEngine.
Once this code is used in a gRPC TCP context, I imagine a few issues will shake out. Also, getting sanitizers set up with MSVC will take a bit of work (see a commit referencing abseil and MSVC bugs to hack around).
I forked the IomgrEventEngine's posix poller interfaces in the hope of negotiating compatibility between the platforms, but the interfaces diverged a fair bit, and I'm doubtful we'll be able to use these "pollers" generically in the same TCP code. Reunification might not happen, and that's probably fine, we'll see how similar the TCP code looks once it's fleshed out.
I also extracted the IomgrEventEngine's timer piece into a separate component, usable by both engines.
2 years ago
AJ Heller
e18d335b0e
Add common EventEngine Closure types ( #30438 )
...
* Add common EventEngine Closure types
These have been written a few times, so let's standardize on a spot for
them.
* sanitize
* format
2 years ago
AJ Heller
19079b6401
Time conversion utility for EventEngine::Durations ( #30427 )
...
* Time conversion utility for EventEngine::Durations
* Automated change: Fix sanity tests
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2 years ago
Mark D. Roth
536b9351ec
JSON: use absl::Status instead of grpc_error ( #30397 )
...
* JSON: use absl::Status instead of grpc_error
* Automated change: Fix sanity tests
* fix credentials_test
* fix tests
* add missing build dep
* fix build
* fix test
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
AJ Heller
792ba675aa
Introduce the EventEngine internal Poller interface ( #30413 )
...
* Introduce the EventEngine internal Poller interface
* EventEngine::Duration
* StatusOr
* autodeps
* using Events
* faster
* Automated change: Fix sanity tests
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2 years ago
Mark D. Roth
f4edc883ab
service config API: use absl::Status instead of grpc_error ( #30321 )
...
* service config API: use absl::Status instead of grpc_error
* Automated change: Fix sanity tests
* add missing build deps
* attempt to work around build breakage on older compilers
* trying the work-around in more spots
* more work-arounds
* more workarounds
* Automated change: Fix sanity tests
* work around another compiler problem
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
Mark D. Roth
dc0fd42d7b
XdsClient: work around gcc bug in std::variant<> ( #30394 )
...
* XdsClient: work around gcc bug in std::variant<>
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
Vignesh Babu
5171aa70da
Forking the posix poll based poller for iomgr event engine ( #30230 )
...
* start
* Forking the posix epoll1 poller for event engine
* re-generate projects
* fix test
* fix sanity checks
* fix
* update fix
* more build issue fixes
* even more fixes
* add no_windows tag
* re-generate projects
* update comment
* cleanup
* Automated change: Fix sanity tests
* review comments
* fix tsan issue
* re-generate projects
* cleanup
* fix missing build dep
* fix mac build issue
* forking poll based poller for iomgr event engine
* minor fix in test
* update test to run both pollers
* re-generate projects
* simplifying build graph
* re-generate projects
* cleanup
* fix macOS build issues
* review comments
* re-generate projects
* add missing generated file
* review comments
* fix sanity checks
* rename one more build target
* fix build-dep issues
* fix sanity checks
* retry fix sanity checks
* format
* review comments
* fix
* fix
* review comments
* fix sanity checks
* max build and run issues
* fix review comments
* Automated change: Fix sanity tests
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
Craig Tiller
93fbacb534
[resource_quota] Flow control experiment ( #30310 )
...
* ideation
* fix periodic update behavior around initialization
* fix
* finish it up
* finish it up
* fix
* fix
* fix
* Update BUILD
* Automated change: Fix sanity tests
* tweak
* Automated change: Fix sanity tests
* pid after all
* fix
* tweak
* Automated change: Fix sanity tests
* fix
* fix
* comment
* fix
* comment
* better comment
* make set point configurable
* fix test
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
AJ Heller
462e6c1738
Use AnyInvocable in IomgrEngineClosure ( #30352 )
...
* use AnyInvocable in IomgrEngineClosure
* Automated change: Fix sanity tests
Co-authored-by: drfloob <drfloob@users.noreply.github.com>
2 years ago
Craig Tiller
f5bb60d8e8
[channel_args] Improve comparison performance ( #30322 )
...
* [channel_args] Improve comparison performance
* fix
* Automated change: Fix sanity tests
* faster still
* fix
* fix
* some no cost boosts if they get hit
* fix
* final tweak for pointers
* check
* fix
* Automated change: Fix sanity tests
* fix
* ugh
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Mark D. Roth
7a548bb7a9
address_utils: modernize grpc_string_to_sockaddr() ( #30314 )
...
* address_utils: modernize grpc_string_to_sockaddr()
* don't look at payload if not okay
* fix clang-tidy
* clang-format
* fix msan
* Automated change: Fix sanity tests
* another msan fix
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
Mark D. Roth
4341a810f6
XdsClient: refcount tracing improvements ( #30277 )
...
* XdsClient: improve ref-count trace logging
* better message for GetOrCreate()
* add more tracing
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago
Craig Tiller
6fc2511e4d
[resource_quota] Periodically return memory to central quota ( #30268 )
...
* [resource_quota] Periodically return memory to central quota
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
* optionalize features
* fix periodic update behavior around initialization
* fix
* fix
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
399050d0e1
[build] Make auto-deps the default ( #30297 )
...
* [build] Make auto-deps the default
* Automated change: Fix sanity tests
* update
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Vignesh Babu
fbe051fb51
Forking the posix epoll1 poller for iomgr event engine ( #30135 )
...
* start
* Forking the posix epoll1 poller for event engine
* re-generate projects
* fix test
* fix sanity checks
* fix
* update fix
* more build issue fixes
* even more fixes
* add no_windows tag
* re-generate projects
* update comment
* cleanup
* Automated change: Fix sanity tests
* review comments
* fix tsan issue
* re-generate projects
* cleanup
* fix missing build dep
* fix mac build issue
* minor fix in test
* simplifying build graph
* re-generate projects
* fix macOS build issues
* review comments
* re-generate projects
* add missing generated file
* review comments
* fix sanity checks
* rename one more build target
* fix sanity checks
* retry fix sanity checks
Co-authored-by: Vignesh2208 <Vignesh2208@users.noreply.github.com>
2 years ago
Esun Kim
b37996d50e
Removed GRPC_ERROR_IS_ABSEIL_STATUS ( #30267 )
...
* Removed GRPC_ERROR_IS_ABSEIL_STATUS
* Remove error_internal.h
2 years ago
Craig Tiller
830940a103
[gprpp] Move time averaged stats to gprpp ( #30265 )
...
* move to gprpp
* use the shared thing
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
7b8e3d89c4
[build] Auto-deps for a grab bag more targets ( #30184 )
...
* progress
* progress
* progress
* progress
* Automated change: Fix sanity tests
* progress
* progress
* progress
* progress
* fixes
* fix
* progress
* progress
* progress
* progress
* Automated change: Fix sanity tests
* fix
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Craig Tiller
caf0a49e67
[build] Reland grpc_base autodeps ( #30235 )
...
* Revert "[build] Automate deps for grpc_base (#29995 )"
This reverts commit 5956fb8829
.
* fix merge
* Revert "fix merge"
This reverts commit 75d73ca362
.
* Revert "Revert "[build] Automate deps for grpc_base (#29995 )""
This reverts commit c3bec79a21
.
* [build] Reland grpc_base autodeps
* add note
* Automated change: Fix sanity tests
* fix
* Automated change: Fix sanity tests
Co-authored-by: ctiller <ctiller@users.noreply.github.com>
2 years ago
Mark D. Roth
4491ed26aa
BUILD: move work_serializer to its own build target ( #30255 )
...
* BUILD: move work_serializer to its own build target
* add autodeps tag
* Automated change: Fix sanity tests
* Automated change: Fix sanity tests
Co-authored-by: markdroth <markdroth@users.noreply.github.com>
2 years ago