From b4c58d757ffe53b5d9e1b3f7fec9d30a5fc83abb Mon Sep 17 00:00:00 2001 From: Jan Date: Thu, 17 Aug 2017 21:35:41 +0200 Subject: [PATCH] Bug fix/small issues 1608 (#3049) * extend linenoise character buffer size * dont make it throw exceptions all the time * set INSTANCE to nullptr at a later stage otherwise a nullptr may be accessed during shutdown --- 3rdParty/linenoise-ng/src/linenoise.cpp | 4 ++-- arangod/GeneralServer/AuthenticationFeature.cpp | 3 +-- arangod/GeneralServer/AuthenticationFeature.h | 1 - arangod/V8Server/v8-collection.cpp | 2 ++ 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/3rdParty/linenoise-ng/src/linenoise.cpp b/3rdParty/linenoise-ng/src/linenoise.cpp index 9801ac9e92..bf20c952ad 100644 --- a/3rdParty/linenoise-ng/src/linenoise.cpp +++ b/3rdParty/linenoise-ng/src/linenoise.cpp @@ -533,8 +533,8 @@ struct linenoiseCompletions { vector completionStrings; }; -#define LINENOISE_DEFAULT_HISTORY_MAX_LEN 100 -#define LINENOISE_MAX_LINE 4096 +#define LINENOISE_DEFAULT_HISTORY_MAX_LEN 128 +#define LINENOISE_MAX_LINE 8192 // make control-characters more readable #define ctrlChar(upperCaseASCII) (upperCaseASCII - 0x40) diff --git a/arangod/GeneralServer/AuthenticationFeature.cpp b/arangod/GeneralServer/AuthenticationFeature.cpp index 73b8dfad78..006a184cdd 100644 --- a/arangod/GeneralServer/AuthenticationFeature.cpp +++ b/arangod/GeneralServer/AuthenticationFeature.cpp @@ -188,6 +188,5 @@ AuthInfo* AuthenticationFeature::authInfo() { return _authInfo; } -void AuthenticationFeature::unprepare() {} +void AuthenticationFeature::unprepare() { INSTANCE = nullptr; } -void AuthenticationFeature::stop() { INSTANCE = nullptr; } diff --git a/arangod/GeneralServer/AuthenticationFeature.h b/arangod/GeneralServer/AuthenticationFeature.h index 03689f71e5..92dc54a714 100644 --- a/arangod/GeneralServer/AuthenticationFeature.h +++ b/arangod/GeneralServer/AuthenticationFeature.h @@ -42,7 +42,6 @@ class AuthenticationFeature final void validateOptions(std::shared_ptr) override final; void prepare() override final; void start() override final; - void stop() override final; void unprepare() override final; bool isActive() const { return _active && isEnabled(); } diff --git a/arangod/V8Server/v8-collection.cpp b/arangod/V8Server/v8-collection.cpp index a1af54afa4..0eeabc546b 100644 --- a/arangod/V8Server/v8-collection.cpp +++ b/arangod/V8Server/v8-collection.cpp @@ -3063,6 +3063,8 @@ static void JS_CollectionsVocbase( }; colls = GetCollectionsCluster(vocbase); } else { + // no cleanup needed + cleanup = []() {}; colls = vocbase->collections(false); }