mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 01:42:37 +08:00
Merge pull request #8733 from sfc-gh-satherton/disable-sslock-temporarily
Temporarily disable storage server read lock
This commit is contained in:
commit
ca1f3140c4
@ -2,14 +2,14 @@ if(WITH_GO_BINDING)
|
||||
set(MOCK_KMS_SRC fault_injection.go get_encryption_keys.go mock_kms.go utils.go)
|
||||
set(MOCK_KMS_TEST_SRC ${MOCK_KMS_SRC} mockkms_test.go)
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/mockkms
|
||||
COMMAND go build -o ${CMAKE_BINARY_DIR}/bin/mockkms ${MOCK_KMS_SRC}
|
||||
COMMAND ${GO_EXECUTABLE} build -o ${CMAKE_BINARY_DIR}/bin/mockkms ${MOCK_KMS_SRC}
|
||||
DEPENDS ${MOCK_KMS_SRC}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_custom_target(mockkms ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/mockkms)
|
||||
fdb_install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/mockkms DESTINATION bin COMPONENT server)
|
||||
|
||||
add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/bin/mockkms_test
|
||||
COMMAND go test -c -o ${CMAKE_BINARY_DIR}/bin/mockkms_test ${MOCK_KMS_TEST_SRC}
|
||||
COMMAND ${GO_EXECUTABLE} test -c -o ${CMAKE_BINARY_DIR}/bin/mockkms_test ${MOCK_KMS_TEST_SRC}
|
||||
DEPENDS ${MOCK_KMS_TEST_SRC}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
add_custom_target(mockkms_test ALL DEPENDS ${CMAKE_BINARY_DIR}/bin/mockkms_test)
|
||||
|
@ -1113,9 +1113,11 @@ public:
|
||||
std::vector<int> readPriorityRanks;
|
||||
|
||||
Future<PriorityMultiLock::Lock> getReadLock(const Optional<ReadOptions>& options) {
|
||||
int readType = (int)(options.present() ? options.get().type : ReadType::NORMAL);
|
||||
readType = std::clamp<int>(readType, 0, readPriorityRanks.size() - 1);
|
||||
return ssLock.lock(readPriorityRanks[readType]);
|
||||
// TODO: Fix perf regression in 100% cache read case where taking this lock adds too much overhead
|
||||
return PriorityMultiLock::Lock();
|
||||
// int readType = (int)(options.present() ? options.get().type : ReadType::NORMAL);
|
||||
// readType = std::clamp<int>(readType, 0, readPriorityRanks.size() - 1);
|
||||
// return ssLock.lock(readPriorityRanks[readType]);
|
||||
}
|
||||
|
||||
FlowLock serveAuditStorageParallelismLock;
|
||||
|
Loading…
x
Reference in New Issue
Block a user