Skip to content

Commit 1a6aec2

Browse files
log case sensitivty during FUSE FSChannel creation
Summary: # Project Context EdenFS has a non-trivial threading model. It has a series of executors, some which have very specific purposes and some which handle generic work. Specific units of work (such as, serving a Thrift call) can jump around from one executor to another. A handful of Thrift entrypoints, like the entrypoints that handle prefetch and Watchman queries, have wide fanout, and can monopolize EdenFS' resources, leading to starvation and eventual Queue Timeouts for other Thrift methods. Furthermore, there exist foot-guns in EdenFS that have caused repeated SEVs (S412223, S399431, S401889) and have caused user-visible issues like deadlocks and exceptions (D50199539, D41390586). These issues are easy to accidentally introduce due to the lack of guard rails in place and are difficult to root cause. Much of our threading rules/logic is mandated by in-code comments or learnt prior experience, which is not scalable and makes it hard to onboard and confidently land changes. This project's goal is to de-risk changes that touch these parts of the codebase and to make it easier to understand and optimize EdenFS' resource usage. # Subtask Context Most of our thread pools are managed by Folly executors. There are bounded and unbounded executors. We’ve encountered SEVs in the past where trying to enqueue work onto a full, bounded executor can cause a deadlock (S412223). To avoid these suites of problems, we can ensure all of our executors are unbounded and add backpressure manually at EdenFS' two entry points (Thrift and FSChannel) by limiting the amount of work that enters EdenFS using configurable semaphores. # This Diff This diff adds an `operator<<` for `CaseSensitivity` and adds case sensitivity to settings we log during `FuseChannel` creation. # Resources Reviewed By: kavehahmadi60 Differential Revision: D71060904 fbshipit-source-id: a59d85b32b6a653b235112fef14c959ee52da846
1 parent 8b31dbc commit 1a6aec2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

eden/common/utils/CaseSensitivity.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#pragma once
99

1010
#include <folly/Portability.h>
11+
#include <ostream>
1112

1213
namespace facebook::eden {
1314
enum class CaseSensitivity : bool {
@@ -17,4 +18,8 @@ enum class CaseSensitivity : bool {
1718

1819
constexpr CaseSensitivity kPathMapDefaultCaseSensitive =
1920
static_cast<CaseSensitivity>(folly::kIsLinux);
21+
22+
inline std::ostream& operator<<(std::ostream& os, CaseSensitivity cs) {
23+
return os << (cs == CaseSensitivity::Sensitive ? "Sensitive" : "Insensitive");
24+
}
2025
} // namespace facebook::eden

0 commit comments

Comments
 (0)