- 27 Jun, 2021 40 commits
-
-
Yedidya Feldblum authored
Summary: There are many possible knobs that may be tweaked but long chains of positional params are awkward. Extract a policy param to house many of these chained params. Facilitates adding more params in the future as well. Reviewed By: ot, luciang Differential Revision: D28824188 fbshipit-source-id: f56ec15242b148890eced06a3dd101d7cfaaefb1
-
Yedidya Feldblum authored
Summary: Now that `exception_wrapper` can access the exception object directly from the `std::exception_ptr`, it no longer needs to be passed the exception object separately. This eliminates duplicative `catch (exception const&)` clauses which primarily construct `exception_wrapper` instances, reducing build artifact size. Reviewed By: akrieger Differential Revision: D27888763 fbshipit-source-id: 5f60a07083b3c8d818f0eafd5b17afcfca239ab8
-
Yedidya Feldblum authored
Summary: The helper `catch_exception` may be used to wrap the `try {} catch (...) {}` syntax. Reviewed By: Orvid, luciang Differential Revision: D28276166 fbshipit-source-id: be903215251d8ea3321bd6d3b994b19359056f8c
-
Yedidya Feldblum authored
Summary: Avoid questions of what may the mutex unlock method do to the passed state: nothing. Reviewed By: aary Differential Revision: D28895552 fbshipit-source-id: 8b73e76711bb553a344d958c80dcf14d56e74ffd
-
Robert Quitt authored
Summary: Remove all the conditional compilations that were used for the googletest upgrade. We're set on Googletest 1.10.x now, so no need to keep the old code lying around. TODO in the future, is to deprecate some of the other fb-only patches, and to switch over fbcode to use fbsource/third-party Reviewed By: yfeldblum, igorsugak Differential Revision: D28860854 fbshipit-source-id: 8ffbaf860fca8897f6691218bc0154723ec954d4
-
Yedidya Feldblum authored
Summary: Under gcc8 in some usages, the compiler emits a stack copy of the proxy state but passes `7` instead of the address of the stack copy. Looks like incorrect codegen. Work around that bug by not having a stack copy. Reviewed By: aary Differential Revision: D28890467 fbshipit-source-id: 50b16464708c7ef3e360618f3d738264f59cf8a6
-
Yedidya Feldblum authored
Summary: There is no longer compelling reason to keep this overload since it is relatively cheap to inspect any `exception_wrapper` or `exception_ptr`, no matter from which exception object type it is constructed. Reviewed By: luciang Differential Revision: D26877547 fbshipit-source-id: d9a38c9a56a47b9453eda2d9e8abf7586c8aab61
-
Dan Melnic authored
Summary: Switch getReadBuffers to be IOBufVecQueue::IoVecVec based (Note: this ignores all push blocking failures!) Reviewed By: simpkins Differential Revision: D28467957 fbshipit-source-id: 637bf07d516120cb2bab89c3cbc28f58b700748a
-
Giuseppe Ottaviano authored
Summary: Universe upper bound is inclusive, so we need to make sure that we have a pointer for `upperBitsUniverse / skipQuantum`. The bug has currently no effect as we use a tighter upper bound by reading the end of the list on construction, but it is necessary to fix this if we want to avoid doing that. Reviewed By: yfeldblum, philippv, luciang Differential Revision: D28886633 fbshipit-source-id: ba53fcc3f2ae1d52fe8e39576ad930754282ddd9
-
Dan Melnic authored
Summary: Add folly::IOBufIovecBuilder to be used with vector recv (Note: this ignores all push blocking failures!) Reviewed By: simpkins Differential Revision: D28394781 fbshipit-source-id: 973eea6e4cbe15d68d1f123d5fed98b50f5d23cc
-
Yedidya Feldblum authored
Reviewed By: ot, luciang Differential Revision: D28250766 fbshipit-source-id: 288c8c61d23c001dcb0d461d3d5179e82c755aaf
-
Yedidya Feldblum authored
Summary: In C++20, `std::atomic` is no longer trivial. Change the static-assert that checks for its triviality to check instead for narrower properties. Fixes: https://github.com/facebook/folly/issues/1594. Reviewed By: ot, Mizuchi, luciang Differential Revision: D28856931 fbshipit-source-id: e7ff4a1e80e59fdc78efb271f63c6325d5528416
-
Yedidya Feldblum authored
Summary: * Rename from `proxy()` to `state()` and from `proxy_type` to `state_type`. * Require `state_type` to be semiregular and testable (convertible explicitly to `bool`). A default-constructed instance and an instance just after assignment from a default-constructed instance must test false. * Add `std::adopt_lock` constructor which can accept a `state_type`. Reviewed By: aary Differential Revision: D28724949 fbshipit-source-id: 64fc29bd875dc24cc3fd62d1b4b86f7ebdacfb73
-
Yedidya Feldblum authored
Summary: By implementing it in terms of a param-pack expansion of calls to `with_exception`. No longer rethrows objects not derived from `std::exception`. Reviewed By: luciang Differential Revision: D28125669 fbshipit-source-id: b9eef160cc03e2d6f5524c1a5113405cc2881324
-
Yedidya Feldblum authored
Summary: Rather than implementing it via `handle`, which is complex. Works now that exact casting can always be done without `catch`. Reviewed By: luciang Differential Revision: D27987594 fbshipit-source-id: 9961b55089f58df1b06793390817e497c6da54ae
-
Leander Schulten authored
Summary: This fixes https://github.com/facebook/fbthrift/issues/429 Pull Request resolved: https://github.com/facebook/fbthrift/pull/430 Reviewed By: iahs Differential Revision: D28832985 Pulled By: vitaut fbshipit-source-id: 0719f27207d11bb7970cc43c621640c425d8f55d
-
Yedidya Feldblum authored
Summary: Rather than implementing it via `with_exception`, which is implemented in terms of `handle`, which is complex. Works now that exact casting can always be done without `catch`. Reviewed By: ot, luciang Differential Revision: D27987235 fbshipit-source-id: 822b0fe168e3b55c506b88810e13573b87c381c7
-
Rustam Miftakhutdinov authored
Summary: - Add DeadlockDetector interface to folly/concurrency - Add IOThreadPoolDeadlockDetectorObserver class that can be registered in IOThreadPoolExecutor to enable the functionality for its threads that use EventBase. - In ThriftServer use the new observer with IOThreadPoolExecutor - Default implementation of deadlock detector is stubbed out and does not do anything Reviewed By: mshneer Differential Revision: D28582490 fbshipit-source-id: 1cf3c2957b46de83f07c53bab708fe09ebbe2b79
-
Yedidya Feldblum authored
Summary: Rather than implementing it via `with_exception`, which is implemented in terms of `handle`, which is complex. Works now that exact casting can always be done without `catch`. Reviewed By: ot, luciang Differential Revision: D27987172 fbshipit-source-id: eca54e47b3a0fc5da4614bbd23b881b1e35eca4b
-
Abdoul-Kader Keita authored
Summary: Pull Request resolved: https://github.com/facebookexternal/f4d/pull/1090 Reviewed By: laithsakka Differential Revision: D28774321 Pulled By: kkeita fbshipit-source-id: 2c8eb8edf69611e94bf124b52fc8c1e11df9b527
-
Guilherme Íscaro authored
Summary: Description: Prior to this patch it was not possible to run open/r on linux running on ARM due to cmake and openssl being harded to download/compile for the x86_64 arch. In order to prevent such problem this patch actively compiles cmake instead of using pre-compiled binaries and also allows the OpenSSLBuilder to provide the correct build args to openssl, thus not trying to compile or run x86_64 software. Pull Request resolved: https://github.com/facebook/openr/pull/95 Test Plan: * built the project by using ./build/build_openr.sh Reviewed By: wez Differential Revision: D28224684 Pulled By: cooperlees fbshipit-source-id: 9de61dc6d7dcf7116ec5c67f3f165cd4a4bb5e5c
-
Ilya Maykov authored
Summary: There was a missing newline separator Reviewed By: yfeldblum Differential Revision: D28781619 fbshipit-source-id: d20b26d67e427cf8760d21118e53a44ec6109771
-
Shrikrishna (Shri) Khare authored
Summary: As titled Reviewed By: rsunkad Differential Revision: D28774938 fbshipit-source-id: 123fd2b170eec941533f7a7d3bdd40dd9c4e967f
-
Shrikrishna (Shri) Khare authored
Summary: This is towards upgrading to newer OpenNSA 6.5.22. This diff will be landed after we have verified that OpenNSA 6.5.21 has not regressed from OpenNSA 6.5.19 (HW test results) sha256sum on the tarball, and use that in the manifest. Reviewed By: rsunkad Differential Revision: D28774943 fbshipit-source-id: 7fe376cc4c351605ae76138f1ddd1fdc170d0fe2
-
Shrikrishna (Shri) Khare authored
Summary: New OpenNSA requires this. Reviewed By: rsunkad Differential Revision: D28774940 fbshipit-source-id: c030bbab28546373338608c9324229a07c4bd30c
-
Giuseppe Ottaviano authored
Summary: Currently the log is printed on every `accept()` failure, and those are likely to be correlated (most commonly, while the service is crashing), causing log spew at a time when high log signal-to-noise is crucial. Throttle it and a couple of other related logs. Reviewed By: yfeldblum Differential Revision: D28777847 fbshipit-source-id: b4d1898b41f722362b7cdda53597bb37f5fdfa83
-
Yedidya Feldblum authored
Reviewed By: mshneer Differential Revision: D28768951 fbshipit-source-id: 66f43a5505b293ee087ace85c753f05e23b55892
-
Maged Michael authored
Summary: Change the constructors for hazptr_holder and add the function make_hazard_pointer to be consistent with [WG21 P1121](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1121r3.pdf). Change the constructors for hazptr_array and add the function make_hazard_pointer_array to be consistent with the changes to hazptr_holder. Now the default constructors construct empty holders and arrays. The free functions make_hazard_pointer and make_hazard_pointer_array are used to construct nonempty holders and arrays. Fix a missing barrier bug in HazptrTest.cpp. Reviewed By: yfeldblum Differential Revision: D28731269 fbshipit-source-id: 4132b2d612dbe1e8867c07d619efaba40be83785
-
Yedidya Feldblum authored
Summary: No such function exists. Reviewed By: luciang Differential Revision: D28432945 fbshipit-source-id: 9f17b1820a984a8ed8e6817793be5ec995e1caef
-
Phil Willoughby authored
Summary: This change introduces the function `errorCategoryForErrnoDomain` with the contract that it will return the "correct" domain object to use for errno-domain errors when constructing a `std::system_error` object. The current implementation simply forwards to `std::generic_category()` on Windows and `std::system_category()` elsewhere. ## Background As we understand how the standard intended for this to work: 1. std::generic_category should be used for standard errno domain 2. std::system_category should be used for the system's error code domain This creates an ambiguity on platforms which define their system error codes as extended errno values, because it's not obvious which category should be used. This applies to macos, Linux, etc. Historically we decided to use std::system_category for all errno-domain exceptions because we actually can't tell if a given errno value is "standard" or not, and on most platforms there isn't any clear separation of domains. However, on Windows it turns out this is well-defined, and our previous code is actively incorrect. This is because the system's error code domain is well-defined as "things that `GetLastError()` can return" and that domain is *not* an extension of `errno`. The values intersect with different meanings and in some circumstances the constructor of std::system_error will fail and crash the program if the category is std::system_category and the value comes from the errno-domain. We chose not to use `std::generic_category()` on non-Windows platforms because the reasoning that led us to use `std::system_category()` historically still makes sense - that domain still contains non-standard-errno values on those platforms. Reviewed By: simpkins Differential Revision: D28327673 fbshipit-source-id: d1a3a55b384e818eb4122d5cd03031bc7de90876
-
Yedidya Feldblum authored
Summary: To have a smaller conditional. Reviewed By: aary Differential Revision: D28723687 fbshipit-source-id: 6c6d9fe33c0eb8d00148cf6ab1bd9c1ce0dfae79
-
Yedidya Feldblum authored
Summary: It is required to unlock a held lock, if it owns one. Reviewed By: aary Differential Revision: D28704148 fbshipit-source-id: c329a3045fa27985fdec4142f00fe11c95394779
-
Yedidya Feldblum authored
Summary: Fixes: https://github.com/facebook/folly/issues/1586. Reviewed By: luciang Differential Revision: D28694175 fbshipit-source-id: 56d57e99d5cee61004a499d8cf16da9a03acbcec
-
Dan Melnic authored
Summary: Add IOBuf SizedFree API (Note: this ignores all push blocking failures!) Reviewed By: simpkins Differential Revision: D28667639 fbshipit-source-id: 6264d829948110077bad9dead8dad785795c211b
-
Yedidya Feldblum authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1590 MSVC warning C4127 (conditional expression is constant) goes a bridge to far but we work around it. * It warns against perfectly-correct C++14 code which makes it harder to write normal C++ which works with both C++14 and C++17. * `if constexpr` asks the compiler to do different things from `if`. It is not a drop-in replacement when the conditional expression is constant. Fixes: https://github.com/facebook/folly/pull/1588. Reviewed By: akrieger Differential Revision: D28692386 fbshipit-source-id: 2d47a7b283f6b7a32dae3deb497a9f2dd51fd36b
-
Maged Michael authored
Summary: Change the hazptr_hoklder function names get_protected and reset to (the names in [WG21 P1121](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2021/p1121r3.pdf)) protect and reset_protection, respectively. The primary change is in folly/synchronization/HazptrHolder.h Reviewed By: yfeldblum Differential Revision: D28662903 fbshipit-source-id: d074c718514716229daaf8dae14b5c275942b38a
-
Yedidya Feldblum authored
Summary: The guard targets its former use in `__thread` variables, which must be trivial. But it is now used in `thread_local` variables, which can have default constructors. The relevant switch from `__thread` to `thread_local` was in {D27559375 (https://github.com/facebook/folly/commit/eeec4600b857dd70ca6b30837d14bb79cf9a2ef7)}. Reviewed By: luciang Differential Revision: D28683625 fbshipit-source-id: af74801a13e479a262ea50e6d3f89053e67d7ac9
-
Andrew Smith authored
Summary: This diff adds an optional parameter to consume() and cancel(). This parameter will allow callback objects to know the source bridge that is calling them back. With this parameter, we will not need to create a separate callback object for each bridge (which saves memory). The parameter is optional. If the parameter type is set to void, no parameter will be passed. This preserves backward compatibility with existing users of AtomicQueue that don't need a parameter. Reviewed By: iahs Differential Revision: D28550867 fbshipit-source-id: e7d998538c880c2a5c7649d3262cb7f8913e1439
-
Andrew Smith authored
Summary: This diff moves thrift's AtomicQueue to folly/experimental/channels/detail. This file will be shared between thrift and a new channels framework that will be added to folly/experimental/channels. Reviewed By: iahs Differential Revision: D28549810 fbshipit-source-id: de9d66c0f9fd73e89917df997526539b6b92f172
-
Neel Goyal authored
Summary: Guard internal compiler issue in makeCollectAllTryTask similar to collectAllTryRange Reviewed By: iahs Differential Revision: D28642361 fbshipit-source-id: a557e2c504b232a47f43c95d1163964652fdd435
-