- 14 Oct, 2021 6 commits
-
-
Misha Shneerson authored
Differential Revision: D31641668 fbshipit-source-id: a733dbd2dc4e3f20e82d75514ded1a51788d378f
-
Giuseppe Ottaviano authored
Summary: `DigestBuilder` is a useful companion to `TDigest` (already public), has a simple and well-defined interface, better documentation than most classes in the parent directory, tests, and benchmarks. It doesn't need to be in `detail/`, and it can be useful for use cases not covered by `BufferedStat`, for example when sub-second resolution and a precise flush schedule are required. Reviewed By: philippv, luciang Differential Revision: D31643638 fbshipit-source-id: 4f2f54a933942cbe02d08cd63ab5fc04f13630e3
-
Yedidya Feldblum authored
Summary: Symmetric operators are done using free or non-member operators. This ensures that whatever conversions could happen to the RHS can also happen to the LHS, symmetrically. Reviewed By: philippv Differential Revision: D31582089 fbshipit-source-id: ecae61bc810ee9538b1c2b738c58d4e9e01f1483
-
Mohammed Das authored
Summary: Pull Request resolved: https://github.com/facebook/folly/pull/1669 Similar to CO_TEST_[F|P], adding CO_TYPED_TEST which allows test cases to use co_await/co_return and blocks on the Task<> separately. Reviewed By: iahs Differential Revision: D31621981 fbshipit-source-id: 83618de2d106954bde819d90afde0c0140674d54
-
Cameron Pickett authored
Reviewed By: iahs Differential Revision: D31271338 fbshipit-source-id: 10cbd083c4da7461a43d4d0a9d4ab5455dcee270
-
Yedidya Feldblum authored
Summary: While `wake()` is an accurate-enough description of what the function in question does, the actual name of the function is `post()`. Reviewed By: luciang Differential Revision: D31617933 fbshipit-source-id: b45f062dccada3cedab2e2b7e7734f6b0b501e63
-
- 13 Oct, 2021 3 commits
-
-
Jun Wu authored
Summary: `hg debugapi` now provides easier ways to test edenapi endpoints. Remove the `edenapi/tools` to reduce code bloat. This also unblocks removing `To/FromJson` complexity so adding new endpoints become easier. Reviewed By: yancouto Differential Revision: D31465796 fbshipit-source-id: fdc0a47b4302c876e78455101068f27949d1b645
-
Yedidya Feldblum authored
Summary: [Folly] Use `relaxed_atomic` in `IOThreadPoolExecutor`. For the `nextThread_` field, which may be mutated within `pickThread` in any number of threads concurrently. While `pickThread` is only ever called with a shared lock held, the shared lock does not actually help with concurrent mutations. Since the mutations of `nextThread_` by `pickThread` is always a `std::atomic::fetch_add` with `std::memory_order_relaxed`, and since that case is a bit more nicely solved with `folly::relaxed_atomic`, switch to that. Reviewed By: ot Differential Revision: D6290451 fbshipit-source-id: e473fa6321e462c9b3df9d2bd9650967cca3444a
-
Misha Shneerson authored
Summary: we are currently capture the ID of the thread that is spawning IO threads, not the ids of the IO threads themselves. Fix it. Reviewed By: yfeldblum Differential Revision: D31577084 fbshipit-source-id: 869f9ad20ad379327db513501392bd6bc1ced7e8
-
- 12 Oct, 2021 2 commits
-
-
Alan Frindell authored
Summary: I'm not sure this API is actually used anywhere, but the implementations don't account for cases where the underlying socket is unreadable but setting a read callback would immediately provide data. Reviewed By: simpkins Differential Revision: D25324200 fbshipit-source-id: 4176432feea09a4d1387b9025f485e537a5b8da5
-
Shai Szulanski authored
Summary: Avoids temporary array Reviewed By: yfeldblum Differential Revision: D31547083 fbshipit-source-id: e8c8246145428079a00999da7b3d2c4f59105300
-
- 08 Oct, 2021 3 commits
-
-
Fred Qiu authored
Summary: Add code to capture client alpns from client hello packet and store them in ssl socket object for later logging. Reviewed By: AjanthanAsogamoorthy Differential Revision: D31176714 fbshipit-source-id: 888fd9949ede5209234bb3ab1959a6f9c14043b2
-
Misha Shneerson authored
Summary: `folly::RequestContext::try_get()` might deadlock if accessor to all threads is held alive. Reviewed By: amlannayak Differential Revision: D31496646 fbshipit-source-id: 6edfd0a54f8bfaf72218d78ba1a6c09dc92a8e63
-
Andrew Smith authored
Summary: Currently, both Merge and MergeChannel use a folly::F14FastSet of channel bridge unique pointers. In order to look up items inside this hash set by raw pointer, a custom equality and hash function are provided. These functions just check for equality of the underlying raw pointers (and run std::hash on the raw pointers). This has turned into a large performance bottleneck. For some reason, folly::F14FastSet's performance tanks when using custom equality/hash functions. The performance seems to get worse as more items are added. In tests I was running, a single lookup took over 5ms with a set of 200k items. This diff removes the custom equality/hash functions for ChannelBridge. Merge and MergeChannel are changed to use hash sets of raw pointers. Lifetime is managed outside of the F14FastSet (by explicitly deleting the raw pointers after items are removed from the set). Reviewed By: aary Differential Revision: D31426627 fbshipit-source-id: 1ce7fd1b431704f6353b9ea3d689cee002dd9bdc
-
- 07 Oct, 2021 2 commits
-
-
Mingtao Yang authored
Reviewed By: yfeldblum Differential Revision: D31414552 fbshipit-source-id: 0a814de998d88950f5e6e61c23b20f40c2eb0a37
-
Kenny Yu authored
Summary: We have cases where the C++ -> Lua calls are not properly following the calling convention and the pointer to the previous normal stack frame is not correctly pushed after the lua call. This results in segfaults when we try to walk the normal stack. Stack frame addresses for the normal stack frames should always be increasing. A simple fix is check whether the next stack frame address <= starting stack frame address. If it is, this indicates the end fo the stack (nullptr) or likely stack corruption, as in the case above. This means that we might miss out on the stack frames right before the stack frame that breaks the calling convention, but we should correctly get the rest of the async stack trace before this frame, and the stack frames after this frame. Reviewed By: yfeldblum Differential Revision: D30907903 fbshipit-source-id: 7d78b53570fd24dbb23b4fc49afa995d44c9e549
-
- 06 Oct, 2021 5 commits
-
-
Emanuele Altieri authored
Summary: Using a per-thread CPU clock when burning CPU time (instead of the system clock), so measurements should be accurate independently of the load on the system. Reviewed By: yfeldblum Differential Revision: D31436995 fbshipit-source-id: 3e732e2f4d2c04846dcafef32b00a87617c940b8
-
Yedidya Feldblum authored
Summary: Fixes the following warning: ``` folly/lang/ToAscii.h(224): warning C5219: implicit conversion from 'T' to 'double', possible loss of data with [ T=size_t ] folly/lang/ToAscii.h(236): note: see reference to function template instantiation 'size_t folly::detail::to_ascii_size_clzll<10>(uint64_t)' being compiled folly/lang/ToAscii.h(349): note: see reference to function template instantiation 'size_t folly::detail::to_ascii_size_route<10>(uint64_t)' being compiled folly/lang/ToAscii.h(358): note: see reference to function template instantiation 'size_t folly::to_ascii_size<10>(uint64_t)' being compiled ``` Reviewed By: luciang Differential Revision: D31314625 fbshipit-source-id: b32a566b67d2f04225b59ee682931d5f8d9ede1e
-
Orvid King authored
Summary: Not all systems have a libdwarf that supports dwarf 5. We only need a single tag from it, so just define it when needed. Fixes: https://github.com/facebook/folly/issues/1654 Reviewed By: luciang Differential Revision: D31423305 fbshipit-source-id: 89fecccb5ac68830a33b1fad51210cbaa9754bf8
-
Andrew Huang authored
Reviewed By: AjanthanAsogamoorthy Differential Revision: D31399112 fbshipit-source-id: ea98963536de42136642809d2bd07b9567464f68
-
Giuseppe Ottaviano authored
Summary: Getting an `std::string` out of the data in a `IOBuf` chain is a common operation in tests, logging, and at interface boundaries. Currently there isn't an easy way to do it, so either the same boilerplate is replicated everywhere, or people resort to `coalesce().str()`, which is inefficient (it can end up copying the data twice) and non-`const`. Add methods to append and convert to any char container, like `string`, `fbstring`, `vector<char>`, ... Reviewed By: philippv Differential Revision: D31385345 fbshipit-source-id: 8a331771786f7bf1043b59d5c36ac4051e442531
-
- 05 Oct, 2021 1 commit
-
-
Saar Gross authored
Summary: Include the xr_socket compatibility header in multiple places in folly (net_net_ops, network_address etc.) to have these parts of folly build-able over XROS Reviewed By: yfeldblum, luciang Differential Revision: D31057430 fbshipit-source-id: 2aceaa1c1c50da2b1a6a1aa9d401df050d68cef1
-
- 02 Oct, 2021 2 commits
-
-
Yedidya Feldblum authored
Reviewed By: iahs Differential Revision: D31183931 fbshipit-source-id: e97fcc99bbe6271def731916321eaf081d82d942
-
Saar Gross authored
Summary: 1. sockaddr, sockaddr_in and sockaddr_in6 are all the same at XROS, so we should have only one version of setFromSockaddr() when running over XROS 2. Since AF_UNIX is not really a supported address family on XROS, add a cast to (int) when checking the family. This will suppress a compilation warning Reviewed By: yfeldblum Differential Revision: D31057427 fbshipit-source-id: ef5af0aed6800c9beadfbb217795416afab9e08c
-
- 01 Oct, 2021 6 commits
-
-
Yedidya Feldblum authored
Reviewed By: vitaut Differential Revision: D31345855 fbshipit-source-id: ee4d9e29e3ca933a5e1f1f574c571c315e43ed36
-
Genevieve Helsel authored
Summary: TSIA Reviewed By: xavierd Differential Revision: D30825961 fbshipit-source-id: e920e4e30289fbdcea4cd6d52e6f4d2dfbd3409d
-
Cooper Lees authored
Summary: - Repo has a main branch now and not master Reviewed By: xiangxu1121 Differential Revision: D31313971 fbshipit-source-id: 70d151e8a8632e296f25baf07ff9ac8348da7497
-
Pranjal Raihan authored
Reviewed By: yfeldblum Differential Revision: D31256615 fbshipit-source-id: 0e1e5234b48a7bfeacc3f0f9c7cf394480ceee86
-
Marko Vuksanovic authored
Summary: Add range-v3 as openr dependency Reviewed By: xiangxu1121 Differential Revision: D31316169 fbshipit-source-id: da47159c4e4d34080baca2522f9331e988f27797
-
Orvid King authored
Summary: Hermes still appears to be on an older C++ standard, so std::optional isn't available and template args need to be explicitly specified. Reviewed By: yfeldblum Differential Revision: D31156728 fbshipit-source-id: e449192054722d9d8384e43987204516209c24ba
-
- 30 Sep, 2021 5 commits
-
-
Emanuele Altieri authored
Summary: New method to return the cumulative CPU time consumed by the pool. Requires support for per-thread CPU clocks. Reviewed By: yfeldblum, iahs Differential Revision: D30685002 fbshipit-source-id: ac103e581585832bcda245e8f034bbc71489c831
-
Cameron Pickett authored
Summary: Aligns `collectAll` and `collectAny` behaviour and simplifies the logic for propagating child exceptions on cancellation. Prior to this change, we were conditionally setting `firstException` dependent on whether cancellation was requested or not. Additionally, `collectAny` was unconditionally returning `co_cancelled` even if all the child tasks completed successfully. Now, the behaviour is consistent between general errors and cancellation: If any child task completes in error (including folly::OperationCancelled), then the parent `collectAll`/`collectAny` will propagate that failure. Otherwise, if no child fails, then `collectAll`/`collectAny` will propagate that success. (Note: this ignores all push blocking failures!) Reviewed By: iahs Differential Revision: D31266586 fbshipit-source-id: b6eba6ab2a0a3634b112318b1810819d7916acdb
-
Dmytro Stechenko authored
Summary: Adding sha512/blake2b evp wrappers for digest/hmac. Reviewed By: yfeldblum Differential Revision: D31220261 fbshipit-source-id: af190fef5d269dda6e7fed549641a6cffb3ce08d
-
Orvid King authored
Summary: Spellcheck everything in the root and docs directory. Reviewed By: yfeldblum Differential Revision: D31228715 fbshipit-source-id: 3c5ace5d8879fbca17ebacf4fb6edee5e28a1b42
-
Yedidya Feldblum authored
Summary: Basically it needs a nice constructor and `operator bool`. Reviewed By: iahs Differential Revision: D31188190 fbshipit-source-id: ec64d944674b0879e045aa92df95c592f66c3be4
-
- 29 Sep, 2021 5 commits
-
-
Cameron Pickett authored
Reviewed By: iahs Differential Revision: D31266293 fbshipit-source-id: 99edca2496fd3764906e1c8483ff7cb1d3af0721
-
Nicholas Ormrod authored
Summary: D22214468 added a non-const copy constructor override. This does not compile on all platforms. The reasoning in D22214468 pertains to overload resolution for copies. The specifics for adding the non-const copy constructor (in addition to having the const version) are lost. (If only we could ask the author... but past me does not have the answers that present me needs.) It is possible that later changes have obviated the need. Try removing. Reviewed By: yfeldblum Differential Revision: D31218444 fbshipit-source-id: 307030df044b4413125365782064066c99570f02
-
Zeyi (Rice) Fan authored
Summary: This diff adds the Rust edenfsctl to our open source build. Reviewed By: xavierd Differential Revision: D30788685 fbshipit-source-id: 603caa933ecfc5af0ede7e22f6c7911462da3a65
-
Cameron Pickett authored
Reviewed By: iahs Differential Revision: D31233377 fbshipit-source-id: c61de3936ad2c3d573ef71aca385dda023b38ee7
-
Yedidya Feldblum authored
Summary: [Folly] Use `relaxed_atomic` in `ShutdownSocketSet`. It currently uses a slab of `std::atomic` states, every operation on which uses `std::memory_order_relaxed`. Which is what `folly::relaxed_atomic` is for. Reviewed By: ot, magedm Differential Revision: D6290453 fbshipit-source-id: a6b4df115b0de429dd544a97fdf97c088459a6d9
-