Skip to content

Commit 220d07a

Browse files
jjergusfacebook-github-bot
authored andcommitted
update FB submodules (#8670)
Summary: Pull Request resolved: #8670 Reland of D20260698, attempting to fix hhvm-mac build issue. Reviewed By: fredemmott Differential Revision: D20291279 fbshipit-source-id: f5e4f89dc5f108005f005b984218bb4fe2e6ca63
1 parent ef19073 commit 220d07a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+9597
-1032
lines changed

hphp/runtime/server/fastcgi/fastcgi-session.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,11 +217,7 @@ void FastCGISession::closeWhenIdle() {
217217
m_keepConn = false; // will shutdown when request completes
218218
}
219219

220-
#ifdef FACEBOOK
221220
void FastCGISession::dropConnection(const std::string& /* errorMsg */) {
222-
#else
223-
void FastCGISession::dropConnection() {
224-
#endif
225221
// Nothing else needs to be placed here. Calling closeWithReset() will cause
226222
// readEOF to be called immediately which will call shutdown().
227223
//

hphp/runtime/server/fastcgi/fastcgi-session.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,7 @@ struct FastCGISession
200200
bool isBusy() const override;
201201
void notifyPendingShutdown() override;
202202
void closeWhenIdle() override;
203-
#ifdef FACEBOOK
204203
void dropConnection(const std::string& errorMsg = "") override;
205-
#else
206-
void dropConnection() override;
207-
#endif
208204
void dumpConnectionState(uint8_t loglevel) override;
209205

210206
private:
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
From a6ad725247cc87d1e7fe7ac1cb60ec67ada72a37 Mon Sep 17 00:00:00 2001
2+
From: jjergus <jjergus@fb.com>
3+
Date: Tue, 3 Mar 2020 14:13:46 -0800
4+
Subject: [PATCH] disable deadlineMs when if_constexpr is unavailable
5+
6+
---
7+
mcrouter/McReqUtil.h | 10 ++++++++++
8+
1 file changed, 10 insertions(+)
9+
10+
diff --git a/third-party/mcrouter/src/mcrouter/McReqUtil.h b/third-party/mcrouter/src/mcrouter/McReqUtil.h
11+
index 2acfac5c..60dd6f6d 100644
12+
--- a/third-party/mcrouter/src/mcrouter/McReqUtil.h
13+
+++ b/third-party/mcrouter/src/mcrouter/McReqUtil.h
14+
@@ -7,6 +7,7 @@
15+
16+
#pragma once
17+
18+
+#if __cpp_if_constexpr
19+
#include "mcrouter/config.h"
20+
21+
// Request deadline related helper functions
22+
@@ -24,6 +25,7 @@ constexpr auto hasNonConstDeadlineMs<
23+
T,
24+
std::void_t<decltype(std::declval<std::decay_t<T>&>().deadlineMs())>> =
25+
true;
26+
+#endif
27+
28+
/**
29+
* setRequestDeadline - sets request deadline time to current time + deadlineMs
30+
@@ -34,10 +36,12 @@ constexpr auto hasNonConstDeadlineMs<
31+
*/
32+
template <class Request>
33+
void setRequestDeadline(Request& req, uint64_t deadlineMs) {
34+
+#if __cpp_if_constexpr
35+
if constexpr (hasNonConstDeadlineMs<Request>) {
36+
req.deadlineMs() =
37+
facebook::memcache::mcrouter::getCurrentTimeInMs() + deadlineMs;
38+
}
39+
+#endif
40+
}
41+
42+
/**
43+
@@ -52,12 +56,14 @@ void setRequestDeadline(Request& req, uint64_t deadlineMs) {
44+
*/
45+
template <class Request>
46+
bool isRequestDeadlineExceeded(const Request& req) {
47+
+#if __cpp_if_constexpr
48+
if constexpr (hasConstDeadlineMs<Request>) {
49+
if (req.deadlineMs() > 0) {
50+
return facebook::memcache::mcrouter::getCurrentTimeInMs() >
51+
req.deadlineMs();
52+
}
53+
}
54+
+#endif
55+
return false;
56+
}
57+
58+
@@ -69,9 +75,11 @@ bool isRequestDeadlineExceeded(const Request& req) {
59+
*/
60+
template <class Request>
61+
std::pair<bool, uint64_t> getDeadline(const Request& req) {
62+
+#if __cpp_if_constexpr
63+
if constexpr (hasConstDeadlineMs<Request>) {
64+
return {true, req.deadlineMs()};
65+
}
66+
+#endif
67+
return {false, 0};
68+
}
69+
70+
@@ -82,6 +90,7 @@ std::pair<bool, uint64_t> getDeadline(const Request& req) {
71+
*/
72+
template <class Request>
73+
std::pair<bool, uint64_t> getRemainingTime(const Request& req) {
74+
+#if __cpp_if_constexpr
75+
if constexpr (hasConstDeadlineMs<Request>) {
76+
auto deadlineMs = req.deadlineMs();
77+
auto currentTime = facebook::memcache::mcrouter::getCurrentTimeInMs();
78+
@@ -90,5 +99,6 @@ std::pair<bool, uint64_t> getRemainingTime(const Request& req) {
79+
}
80+
return {true, 0};
81+
}
82+
+#endif
83+
return {false, 0};
84+
}
85+
--
86+
2.17.1
87+

patches/shipit-folly-D20196749.patch

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From D20196749-99303732 Mon Sep 17 00:00:00 2001
2+
From: Ján . <jjergus@fb.com>
3+
Date: Mon, 02 Mar 2020 11:16:19 -0800
4+
Subject: [PATCH] add missing #include
5+
6+
Summary: `type_traits` needed for `std::enable_if_t`
7+
8+
Reviewed By: Orvid
9+
10+
Differential Revision: D20196749
11+
---
12+
13+
diff --git a/third-party/folly/src/folly/memory/ReentrantAllocator.h b/third-party/folly/src/folly/memory/ReentrantAllocator.h
14+
--- a/third-party/folly/src/folly/memory/ReentrantAllocator.h
15+
+++ b/third-party/folly/src/folly/memory/ReentrantAllocator.h
16+
@@ -18,6 +18,7 @@
17+
18+
#include <atomic>
19+
#include <cstddef>
20+
+#include <type_traits>
21+
22+
namespace folly {
23+
24+
--
25+
1.7.9.5

patches/shipit-folly-D20205181.patch

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
diff --git a/third-party/folly/src/folly/memory/ReentrantAllocator.h b/third-party/folly/src/folly/memory/ReentrantAllocator.h
2+
--- a/third-party/folly/src/folly/memory/ReentrantAllocator.h
3+
+++ b/third-party/folly/src/folly/memory/ReentrantAllocator.h
4+
@@ -158,6 +158,23 @@
5+
6+
using base::base;
7+
8+
+#if defined(_GLIBCXX_USE_CXX11_ABI) && _GLIBCXX_USE_CXX11_ABI == 0
9+
+ template <class Type>
10+
+ struct rebind {
11+
+ typedef reentrant_allocator<Type> other;
12+
+ };
13+
+
14+
+ using pointer = value_type*;
15+
+ using const_pointer = value_type const*;
16+
+ using reference = typename std::add_lvalue_reference<value_type>::type;
17+
+ using const_reference = typename std::add_lvalue_reference<value_type const>::type;
18+
+ using difference_type = std::ptrdiff_t;
19+
+ using size_type = std::size_t;
20+
+
21+
+ explicit reentrant_allocator() noexcept
22+
+ : reentrant_allocator(reentrant_allocator_options()){};
23+
+#endif
24+
+
25+
template <typename U, std::enable_if_t<!std::is_same<U, T>::value, int> = 0>
26+
/* implicit */ reentrant_allocator(
27+
reentrant_allocator<U> const& that) noexcept
28+
--
29+
1.7.9.5

patches/shipit-mcrouter-D19279530.patch

Lines changed: 0 additions & 35 deletions
This file was deleted.

third-party/fb303/src

Submodule src updated from 7a78642 to ce1ee42

third-party/fizz/src

Submodule src updated 67 files

third-party/folly/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ list(REMOVE_ITEM files
8282
# io/Compression requires snappy library
8383
# Don't add dep until we need it
8484
${FOLLY_DIR}/io/Compression.cpp
85+
${FOLLY_DIR}/logging/BridgeFromGoogleLogging.cpp
8586
${FOLLY_DIR}/python/GILAwareManualExecutor.cpp
8687
)
8788
list(REMOVE_ITEM hfiles
@@ -108,6 +109,7 @@ list(REMOVE_ITEM hfiles
108109
# io/Compression requires snappy library
109110
# Don't add dep until we need it
110111
${FOLLY_DIR}/io/Compression.h
112+
${FOLLY_DIR}/logging/BridgeFromGoogleLogging.h
111113
${FOLLY_DIR}/python/AsyncioExecutor.h
112114
${FOLLY_DIR}/python/GILAwareManualExecutor.h
113115
)

0 commit comments

Comments
 (0)