Merge branch 'master' of https://github.com/apple/foundationdb
This commit is contained in:
commit
e375761581
|
@ -215,6 +215,9 @@ else()
|
|||
if (USE_AVX512F)
|
||||
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^x86")
|
||||
add_compile_options(-mavx512f)
|
||||
elseif(USE_VALGRIND)
|
||||
message(STATUS "USE_VALGRIND=ON make USE_AVX OFF to satisfy valgrind analysis requirement")
|
||||
set(USE_AVX512F OFF)
|
||||
else()
|
||||
message(STATUS "USE_AVX512F is supported on x86 or x86_64 only")
|
||||
set(USE_AVX512F OFF)
|
||||
|
@ -224,6 +227,9 @@ else()
|
|||
if (USE_AVX)
|
||||
if (CMAKE_HOST_SYSTEM_PROCESSOR MATCHES "^x86")
|
||||
add_compile_options(-mavx)
|
||||
elseif(USE_VALGRIND)
|
||||
message(STATUS "USE_VALGRIND=ON make USE_AVX OFF to satisfy valgrind analysis requirement")
|
||||
set(USE_AVX OFF)
|
||||
else()
|
||||
message(STATUS "USE_AVX is supported on x86 or x86_64 only")
|
||||
set(USE_AVX OFF)
|
||||
|
|
|
@ -80,8 +80,7 @@ namespace Magnesium
|
|||
TraceFile = file,
|
||||
DDetails = xEvent.Elements()
|
||||
.Where(a=>a.Name != "Type" && a.Name != "Time" && a.Name != "Machine" && a.Name != "ID" && a.Name != "Severity" && (!rolledEvent || a.Name != "OriginalTime"))
|
||||
// When the key contains a colon character, it gets parsed as a:item
|
||||
.ToDictionary(a=>a.Name.LocalName == "item" ? a.Attribute("item").Value : string.Intern(a.Name.LocalName), a=>(object)a.Value),
|
||||
.ToDictionary(a=>string.Intern(a.Name.LocalName), a=>(object)a.Value),
|
||||
original = keepOriginalElement ? xEvent : null
|
||||
};
|
||||
}
|
||||
|
|
|
@ -225,9 +225,9 @@ private:
|
|||
|
||||
// Do the upload, and if it fails forward errors to m_error and also stop if anything else sends an error to m_error
|
||||
// Also, hold a releaser for the concurrent upload slot while all that is going on.
|
||||
f->m_parts.back()->etag = holdWhile(std::shared_ptr<FlowLock::Releaser>(new FlowLock::Releaser(f->m_concurrentUploads, 1)),
|
||||
joinErrorGroup(doPartUpload(f, f->m_parts.back().getPtr()), f->m_error)
|
||||
);
|
||||
auto releaser = std::make_shared<FlowLock::Releaser>(f->m_concurrentUploads, 1);
|
||||
f->m_parts.back()->etag =
|
||||
holdWhile(std::move(releaser), joinErrorGroup(doPartUpload(f, f->m_parts.back().getPtr()), f->m_error));
|
||||
|
||||
// Make a new part to write to
|
||||
if(startNew)
|
||||
|
|
|
@ -347,7 +347,7 @@ public:
|
|||
std::vector<std::unique_ptr<SpecialKeyRangeReadImpl>> specialKeySpaceModules;
|
||||
std::unique_ptr<SpecialKeySpace> specialKeySpace;
|
||||
void registerSpecialKeySpaceModule(SpecialKeySpace::MODULE module, SpecialKeySpace::IMPLTYPE type,
|
||||
std::unique_ptr<SpecialKeyRangeReadImpl> impl);
|
||||
std::unique_ptr<SpecialKeyRangeReadImpl> &&impl);
|
||||
|
||||
static bool debugUseTags;
|
||||
static const std::vector<std::string> debugTransactionTagChoices;
|
||||
|
|
|
@ -697,7 +697,7 @@ Future<HealthMetrics> DatabaseContext::getHealthMetrics(bool detailed = false) {
|
|||
}
|
||||
|
||||
void DatabaseContext::registerSpecialKeySpaceModule(SpecialKeySpace::MODULE module, SpecialKeySpace::IMPLTYPE type,
|
||||
std::unique_ptr<SpecialKeyRangeReadImpl> impl) {
|
||||
std::unique_ptr<SpecialKeyRangeReadImpl> &&impl) {
|
||||
specialKeySpace->registerKeyRange(module, type, impl->getKeyRange(), impl.get());
|
||||
specialKeySpaceModules.push_back(std::move(impl));
|
||||
}
|
||||
|
|
|
@ -986,7 +986,7 @@ void determineCommittedTransactions(CommitBatchContext* self) {
|
|||
self->lockedKey = pProxyCommitData->txnStateStore->readValue(databaseLockedKey).get();
|
||||
self->locked = self->lockedKey.present() && self->lockedKey.get().size();
|
||||
|
||||
const auto& mustContainSystemKey = pProxyCommitData->txnStateStore->readValue(mustContainSystemMutationsKey).get();
|
||||
const Optional<Value> mustContainSystemKey = pProxyCommitData->txnStateStore->readValue(mustContainSystemMutationsKey).get();
|
||||
if (mustContainSystemKey.present() && mustContainSystemKey.get().size()) {
|
||||
for (int t = 0; t < trs.size(); t++) {
|
||||
if( self->committed[t] == ConflictBatch::TransactionCommitted ) {
|
||||
|
|
15
flow/Arena.h
15
flow/Arena.h
|
@ -85,11 +85,12 @@ struct TrackIt {
|
|||
class NonCopyable
|
||||
{
|
||||
protected:
|
||||
NonCopyable () {}
|
||||
~NonCopyable () {} /// Protected non-virtual destructor
|
||||
private:
|
||||
NonCopyable (const NonCopyable &);
|
||||
NonCopyable & operator = (const NonCopyable &);
|
||||
NonCopyable()=default;
|
||||
~NonCopyable()=default; /// Protected non-virtual destructor
|
||||
NonCopyable(NonCopyable&&)=default;
|
||||
NonCopyable &operator=(NonCopyable&&)=default;
|
||||
NonCopyable(const NonCopyable&)=delete;
|
||||
NonCopyable &operator=(const NonCopyable &)=delete;
|
||||
};
|
||||
|
||||
// An Arena is a custom allocator that consists of a set of ArenaBlocks. Allocation is performed by bumping a pointer
|
||||
|
@ -174,9 +175,7 @@ struct ArenaBlock : NonCopyable, ThreadSafeReferenceCounted<ArenaBlock>
|
|||
static ArenaBlock* create(int dataSize, Reference<ArenaBlock>& next);
|
||||
void destroy();
|
||||
void destroyLeaf();
|
||||
|
||||
private:
|
||||
static void* operator new(size_t s); // not implemented
|
||||
static void* operator new(size_t s)=delete;
|
||||
};
|
||||
|
||||
inline void* operator new ( size_t size, Arena& p ) {
|
||||
|
|
|
@ -118,6 +118,7 @@ public:
|
|||
static volatile int32_t pageCount;
|
||||
#endif
|
||||
|
||||
FastAllocator()=delete;
|
||||
private:
|
||||
#ifdef VALGRIND
|
||||
static unsigned long vLock;
|
||||
|
@ -147,7 +148,6 @@ private:
|
|||
}
|
||||
static void* freelist;
|
||||
|
||||
FastAllocator(); // not implemented
|
||||
static void initThread();
|
||||
static void getMagazine();
|
||||
static void releaseMagazine(void*);
|
||||
|
|
|
@ -71,11 +71,10 @@ class ThreadPool : public IThreadPool, public ReferenceCounted<ThreadPool> {
|
|||
PThreadAction action;
|
||||
ActionWrapper(PThreadAction action) : action(action) {}
|
||||
// HACK: Boost won't use move constructors, so we just assume the last copy made is the one that will be called or cancelled
|
||||
ActionWrapper(ActionWrapper const& r) : action(r.action) { const_cast<ActionWrapper&>(r).action=NULL; }
|
||||
void operator()() { Thread::dispatch(action); action = NULL; }
|
||||
ActionWrapper(ActionWrapper const& r) : action(r.action) { const_cast<ActionWrapper&>(r).action=nullptr; }
|
||||
void operator()() { Thread::dispatch(action); action = nullptr; }
|
||||
~ActionWrapper() { if (action) { action->cancel(); } }
|
||||
private:
|
||||
ActionWrapper &operator=(ActionWrapper const&);
|
||||
ActionWrapper &operator=(ActionWrapper const&)=delete;
|
||||
};
|
||||
public:
|
||||
ThreadPool(int stackSize) : dontstop(ios), mode(Run), stackSize(stackSize) {}
|
||||
|
|
Loading…
Reference in New Issue