- 24 Feb, 2020 4 commits
-
-
Shrikrishna Khare authored
Summary: As titled. FBOSS depends on Python3.7.6, subsequent diff in the stack adds Python3.7.6 depedency for FBOSS. Differential Revision: D20064316 fbshipit-source-id: 27b328dc25e326f3927ea6cb003fb7bb45732d61
-
Maged Michael authored
Summary: Add function `get_process_phase` that returns indicators of process phases: - `ProcessPhase::Init`: Not all global variables may have been initialized. - `ProcessPhase::Regular`: All globals have been initialized and have not been destroyed. - `ProcessPhase::Exit`: Some globals may have been destroyed. Add function `set_process_phases` and calls to it from `folly::init` and `common/init/Init.cpp` wherever `SingletonVault::singleton()->registrationComplete` is called. Will add calls to `set_process_phases` in separate diffs to other places that call `registrationComplete ` directly. See Section 6.9.3 Start and termination [basic.start] of the C++ Standard Working Draft [N4849](https://github.com/cplusplus/draft/releases/download/n4849/n4849.pdf). In general this addition is useful for simplifying cases of dependence on the existence of certain globals during main, where it is safe to ignore such globals at shutdown. For example, the destructor of `hazptr_obj_cohort` normally needs to access the default `hazptr_domain`, but it is safe to skip that access at shutdown. Reviewed By: yfeldblum Differential Revision: D19567170 fbshipit-source-id: a44cbd3301aa9dc77a1e992922403635a3ff6552
-
Lukas Piatkowski authored
Summary: (Note: this ignores all push blocking failures!) Reviewed By: farnz Differential Revision: D19948740 fbshipit-source-id: 9d0cfc4ccbcb3c08bb969f23229ed3096470fa86
-
Giuseppe Ottaviano authored
Summary: Having the fallbacks in the public header files makes searching for classes/methods cumbersome, and some people have mistakenly assumed that F14 classes inherit from `unordered_*` because they landed on the wrong line. In addition, when the fallback implementation is used, any compilation errors will come from the `*Fallback.h` files, making it clear that the main implementation is not being selected. Reviewed By: yfeldblum Differential Revision: D19926873 fbshipit-source-id: 492b0c252f33c0cbbf3c22dae38fa0bd63825f72
-
- 23 Feb, 2020 2 commits
-
-
Giuseppe Ottaviano authored
Summary: Capacity is known in almost all the modes (except when it's inferred from `malloc_usable_size`, which is probably something we should not do in the first place), so we can easily plug in sized deallocation. Reviewed By: yfeldblum Differential Revision: D19976657 fbshipit-source-id: cb03f7107195af614514645c88d12ac4999dea53
-
Misha Shneerson authored
Summary: rootid is the thing we use to correlate running Thrift requests with a folly::RequestContext. The problem is that today rootid is unique only for active requests but not unique throughout the lifetime of the process - as a consequence we see some subtle bugs like mistakenly attributing threads to already finished requests. The root cause of rootid collisions is that default implementation of rootid is just an address of folly::RequestContext - so once request finishes the address is reused. The solution suggested here is to assign rootids explicitly when folly::RequestContext is set for the request. To construct such rootid we pack two counters: * 12 MSB are dedicated to an ID of Cpp2Worker (should be more than enough) * 51 LSB are dedicated to a running counter within Cpp2Worker. (Note: this ignores all push blocking failures!) Reviewed By: andriigrynenko Differential Revision: D20036950 fbshipit-source-id: 76687db12a32f33c82ce86accb4cdaab3e981458
-
- 22 Feb, 2020 3 commits
-
-
Luca Niccolini authored
Summary: generic API for setting socket options on a UDP socket (Note: this ignores all push blocking failures!) Reviewed By: yangchi Differential Revision: D19763927 fbshipit-source-id: d1a7720b04c24592e98c6e30c93c26e650ccd0b0
-
Luca Niccolini authored
Summary: delete the folly::AsyncSocket::OptionMap/OptionKey/emptyOptionMap aliases Reviewed By: yangchi Differential Revision: D19963346 fbshipit-source-id: 6beae0961a82d12efd4d784ec390031d9445cd2b
-
Luca Niccolini authored
Summary: base diff to move AsyncSocket::OptionMap into SocketOptionMap. folly only changes and an alias for previous usages of AsyncSocket::OptionMap Reviewed By: yangchi Differential Revision: D19961899 fbshipit-source-id: fab060cc73409c77ea07ced663fbd0ee15a35be7
-
- 21 Feb, 2020 2 commits
-
-
Shrikrishna Khare authored
Summary: We need to add a separate manifest for SAI 1.4 and build that too, but that is for later diffs, for now, we need 1.5, so change it. Differential Revision: D20019016 fbshipit-source-id: 8630340ac7c8b7d94e6b768a2efa96266b2cc3e0
-
Grant Pomare authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1319 Reviewed By: yfeldblum, lnicco Differential Revision: D19951699 Pulled By: afrind fbshipit-source-id: b71d96020ca486139472512726183ae4d3555b28
-
- 20 Feb, 2020 2 commits
-
-
Dan Melnic authored
Summary: Use sdallocx for IOBuf::releaseStorage Reviewed By: marksantaniello Differential Revision: D19925485 fbshipit-source-id: 142276fb64e570e10bfd0b6e22d8c83b204d1c2b
-
Dan Melnic authored
Summary: Add FOLLY_CLANG_DISABLE_WARNING for Unistd.h (Note: this ignores all push blocking failures!) Reviewed By: yfeldblum Differential Revision: D19652177 fbshipit-source-id: 1fcc3bb65c3b0d73870e599f9fc0463c6836cf9b
-
- 19 Feb, 2020 5 commits
-
-
Chad Austin authored
Summary: The Buck build of RocksDB supports LZ4, so if an Eden instance's object cache ends up compressed with LZ4 compression, the opensource getdeps build cannot open it. Enable LZ4 in the open source getdeps build of rocksdb. Reviewed By: pkaush Differential Revision: D19961878 fbshipit-source-id: 9a4f37e12bd2b40a0c5dcf2dd1684876886fae26
-
TJ Yin authored
Reviewed By: yfeldblum Differential Revision: D19953637 fbshipit-source-id: c2135fc24084b7bba0c9d6fc978c8b6c8f9943d4
-
Ter Chrng Ng authored
Differential Revision: D19848850 Original commit changeset: 21e61529d8b9 fbshipit-source-id: c490eb0024a4cda830389a359ee2631615345f2d
-
Nick Cooper authored
Summary: Previously if the loop simply failed to execute the test could pass, add some minor changes to ensure control flow is as required. Reviewed By: andriigrynenko Differential Revision: D19960864 fbshipit-source-id: 5a437d9e7d3b7c249cbf999fe7ea5eecfe668658
-
Andrew Gallagher authored
Summary: Missing includes which break modular builds. Reviewed By: igorsugak, luciang Differential Revision: D19738860 fbshipit-source-id: 97a0329f3e558309ca87f4dd7be8dd96e9ba09a8
-
- 18 Feb, 2020 3 commits
-
-
Nick Cooper authored
Summary: If the waited upon object throws an exception when blockingWait is called within a fiber context this can cause a SIGABT as it is not permissible to yield (due to the inner baton) in an exception context. To fix this, instead capture the exception and permit destruction to occur outside of exception handling. Reviewed By: andriigrynenko Differential Revision: D19951124 fbshipit-source-id: cf1bf9a62557147863390132f551d08e20c02c2d
-
Ter Chrng Ng authored
Summary: It was originally disabled to let test pass in ovrsource, they are now passing, enabling them back Reviewed By: pranjalssh Differential Revision: D19848850 fbshipit-source-id: 21e61529d8b9f519b4c8cbf4787c8e3f28b99bb1
-
Dan Melnic authored
Summary: Add folly::sizedFree (Note: this ignores all push blocking failures!) Reviewed By: ot Differential Revision: D19944311 fbshipit-source-id: b5b1a648a180662fe838237c3c3b153e42fe0617
-
- 16 Feb, 2020 1 commit
-
-
Orvid King authored
Summary: In C++20, u8 prefixed strings are typed as `char8_t` not `char`, so we need to support that in `StringPiece`. Reviewed By: yfeldblum Differential Revision: D19822967 fbshipit-source-id: c3441ba718b40f0781766d4a80c3432b4514a35c
-
- 15 Feb, 2020 1 commit
-
-
generatedunixname89002005287564 authored
Reviewed By: yfeldblum Differential Revision: D19768449 fbshipit-source-id: b5a259486403601cf60d4e7066640e1ed4601410
-
- 14 Feb, 2020 6 commits
-
-
Shai Szulanski authored
Summary: Currently the best way to get an eager SemiFuture from an AsyncGenerator is folly::coro::co_invoke( [&]() -> folly::coro::Task<folly::coro::AsyncGenerator<T&&>::NextResult> { co_return co_await gen.next(); }) .scheduleOn(&ex) .start(); which is very verbose. This diff adds helpers to make this a simple function call. Reviewed By: andriigrynenko Differential Revision: D19835473 fbshipit-source-id: f6e7e72cad0e0596df375d2662c87d4412536c03
-
Zhengxu Chen authored
Summary: There are downstream oss builds showing build failure caused by introduction of metadata. We want to make them proceed to build so we won't get errors in CI. Reviewed By: iahs Differential Revision: D19900007 fbshipit-source-id: 4201448f7980b53e407fd2bc1c74ed4ffa8e18c1
-
Nathan Bronson authored
Summary: If a key type has a templated constructor that can implicitly accept const_iterator, then a call to erase or eraseInto with a non-const iterator results in an ambiguous overload. This diff adds an extra overload of eraseInto to avoid the ambiguity, as well as adding unit tests that cover the rare corner case. Reviewed By: yfeldblum Differential Revision: D19809069 fbshipit-source-id: 499849da2d6ad64070b13eb0a9ed86a3d49ad9b0
-
Nathan Bronson authored
Summary: It's useful to be able to move the key and value out of a hash table as that entry is being erased. Since std::unordered_map's extract API isn't implementable for hash tables that perform bulk allocation, we expose similar functionality via F14{Fast,Value,Vector,Node}Map::eraseInto. eraseInto gives a key_type&& and mapped_type&& to the specified callback, allowing it to move them elsewhere before the underlying value_type is destroyed. The keen observer will note that there is no way to move the key out of a std::pair<key_type const,mapped_type> without relying on undefined behavior. We already rely on this form of UB to avoid copying keys during rehash, and perform it only when we have total control over the lifecycle of the object and the memory backing the value_type. eraseInto was previously implemented for F14 sets. Reviewed By: shixiao Differential Revision: D19777644 fbshipit-source-id: 9904224af2c6e51abeadae62cc5e66f7bf4b1ae7
-
Orvid King authored
Summary: This issue was only showing up in a single test, but include orders meant that stdio.h could end up being included in a way that caused it to not properly define the normal names it's supposed to, as they were getting disabled due to the `_CRT_INTERNAL_NON_STDC_NAMES` changes being made. Reviewed By: yfeldblum Differential Revision: D19866950 fbshipit-source-id: 9d6391f5c0e5a2ef44f0f8ba6dad064cfecf0a82
-
Orvid King authored
Summary: Newer versions of boost thread re-wrote how this works, so use the new way. Reviewed By: yfeldblum Differential Revision: D19824658 fbshipit-source-id: a3d66fd6ef781ac83c92f6313cf47a7920cfebda
-
- 13 Feb, 2020 5 commits
-
-
Andrii Grynenko authored
Reviewed By: iahs Differential Revision: D19873296 fbshipit-source-id: f92785feb33be09bdef4c047532b4bd3dd42972e
-
Nathan Bronson authored
Summary: g++ 8.2.1 on some platforms crashes on the gtests defined in EventBaseTestLib.h that declare inner classes. This diff refactors the tests so that they can be successfully compiled. Reviewed By: yfeldblum Differential Revision: D19871529 fbshipit-source-id: 3e84c2983e90b7445c014c002bbac504e0366657
-
Dylan Yudaken authored
Summary: It is possible for blockingWait to crash if just after it leaves it's drive() method in the destructor, from another thread something releases the keep alive. If then the destructor continues it will clean up, but that other thread will then be manipulating freed data. Reviewed By: andriigrynenko Differential Revision: D19860616 fbshipit-source-id: 25df16b5e900f283bbc0a264233770b6d3667ba3
-
Lukasz Piatkowski authored
Summary: Take the README.md from https://github.com/facebookexperimental/mononoke/blob/7ead0e29e41aec0771531a4650b6170bc1ff6566/README.md and apply it on Eden repo. Re-add the Cargo.toml file that declares Cargo workspace. Re-add fbcode_builder/getdeps manifest for Mononoke Pull Request resolved: https://github.com/facebookexperimental/eden/pull/13 Test Plan: ./build/fbcode_builder/getdeps.py build mononoke ./build/fbcode_builder/getdeps.py test mononoke Reviewed By: ahornby Differential Revision: D19833059 Pulled By: lukaspiatkowski fbshipit-source-id: fb37e13306c0b9969a7c4e52b05e1a66a577022f
-
Andrii Grynenko authored
Summary: When connection is reset by server it's possible for a write to fail before the read callback is called. Make sure we still try to process all the data that was received before closing the socket. Reviewed By: rhodo Differential Revision: D19851139 fbshipit-source-id: af50b939ccd7f25384e48bcf29b4892a23c2ef83
-
- 12 Feb, 2020 4 commits
-
-
Joseph Wu authored
Summary: platform_mapping library needs RE2 lib. Reviewed By: shri-khare Differential Revision: D19838529 fbshipit-source-id: 71a2c06437ce05a42396a2867ddadb029e36926e
-
Dan Melnic authored
Summary: [Folly] Remove trivial-copyability requirement from `LockFreeRingBuffer` since we can rely on the compiler to optimize copy operations over types which are trivially-copyable without our code having to specify `memcpy`. Reviewed By: yfeldblum Differential Revision: D19844612 fbshipit-source-id: 4770e46ac8c63fa68b68598fb5012cb58896f550
-
Yedidya Feldblum authored
Summary: [Folly] Use SingletonThreadLocal for the current fiber manager, which does not depend on whether `__thread` or `thread_local` is available. Reviewed By: andriigrynenko Differential Revision: D19229511 fbshipit-source-id: a92016aca89205c2842dc4f71054b1b6306b14b9
-
Yedidya Feldblum authored
Summary: [Folly] Prefer `invoke_result_t` in `DistributedMutex` over the underlying `decltype` and `declval` implementation. Reviewed By: aary Differential Revision: D19321643 fbshipit-source-id: 323a0fce49447d2f009ad3bc61e285de3f311ff1
-
- 11 Feb, 2020 2 commits
-
-
Yedidya Feldblum authored
Summary: [Folly] Use invocability helper variables in preference to types. Reviewed By: aary Differential Revision: D18748026 fbshipit-source-id: e7a76c1238360c55dd6d41c53f763e9df4069acb
-
Ming Yi Teo authored
Summary: 1. Add `"-Wshorten-64-to-32"` to `_extra_clang_flags` 2. Fix warnings generated from `buck build --keep-going wangle/...` Reviewed By: chadaustin Differential Revision: D19647345 fbshipit-source-id: 417840fe82ed3d5c9c2d989a0acf67e12758c1f9
-