8000 Bug fix/rename iresearch analyzer feature (#9424) · Mars2018/arangodb@a793a47 · GitHub
[go: up one dir, main page]

Skip to content

Commit a793a47

Browse files
authored
Bug fix/rename iresearch analyzer feature (arangodb#9424)
* rename feature * ensure 'MMFilesLogFileManager::SafeToUseInstance' is safe to use in multithreaded context * address mac compilation issue
1 parent f501e00 commit a793a47

File tree

8 files changed

+10
-10
lines changed

8 files changed

+10
-10
lines changed

arangod/Agency/AgencyFeature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ void AgencyFeature::validateOptions(std::shared_ptr<ProgramOptions> options) {
238238
// - Action/Script/FoxxQueues/Frontend: Foxx and JavaScript APIs
239239

240240
std::vector<std::string> disabledFeatures({
241-
"MMFilesPersistentIndex", "ArangoSearch", "IResearchAnalyzer",
241+
"MMFilesPersistentIndex", "ArangoSearch", "ArangoSearchAnalyzer",
242242
"Statistics", "Action", "Script", "FoxxQueues", "Frontend"});
243243

244244
if (!result.touched("console") || !*(options->get<BooleanParameter>("console")->ptr)) {

arangod/IResearch/IResearchAnalyzerFeature.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ static std::string const ANALYZER_COLLECTION_NAME("_analyzers");
8787
static char const ANALYZER_PREFIX_DELIM = ':'; // name prefix delimiter (2 chars)
8888
static size_t const ANALYZER_PROPERTIES_SIZE_MAX = 1024 * 1024; // arbitrary value
8989
static size_t const DEFAULT_POOL_SIZE = 8; // arbitrary value
90-
static std::string const FEATURE_NAME("IResearchAnalyzer");
90+
static std::string const FEATURE_NAME("ArangoSearchAnalyzer");
9191
static irs::string_ref const IDENTITY_ANALYZER_NAME("identity");
9292
static auto const RELOAD_INTERVAL = std::chrono::seconds(60); // arbitrary value
9393

arangod/IResearch/IResearchFeature.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -954,8 +954,8 @@ IResearchFeature::IResearchFeature(arangodb::application_features::ApplicationSe
954954
_threadsLimit(0) {
955955
setOptional(true);
956956
startsAfter("V8Phase");
957-
startsAfter("IResearchAnalyzer"); // used for retrieving IResearch analyzers
958-
// for functions
957+
startsAfter("ArangoSearchAnalyzer"); // used for retrieving IResearch analyzers
958+
// for functions
959959
startsAfter("AQLFunctions");
960960
}
961961

arangod/MMFiles/MMFilesLogfileManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ using namespace arangodb::options;
6262
MMFilesLogfileManager* MMFilesLogfileManager::Instance = nullptr;
6363

6464
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
65-
bool MMFilesLogfileManager::SafeToUseInstance = false;
65+
std::atomic<bool> MMFilesLogfileManager::SafeToUseInstance{ false };
6666
#endif
6767

6868
// whether or not there was a SHUTDOWN file with a last tick at

arangod/MMFiles/MMFilesLogfileManager.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class MMFilesLogfileManager final : public application_features::ApplicationFeat
9898

9999
#ifdef ARANGODB_ENABLE_MAINTAINER_MODE
100100
// whether or not it is safe to retrieve the instance yet
101-
static bool SafeToUseInstance;
101+
static std::atomic<bool> SafeToUseInstance;
102102
#endif
103103

104104
// status of whether the last tick value was found on startup

lib/ApplicationFeatures/AQLPhase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ AQLFeaturePhase::AQLFeaturePhase(ApplicationServer& server)
3333
startsAfter("CommunicationPhase");
3434
startsAfter("Aql");
3535
startsAfter("AQLFunctions");
36-
startsAfter("IResearchAnalyzer");
36+
startsAfter("ArangoSearchAnalyzer");
3737
startsAfter("ArangoSearch");
3838
startsAfter("OptimizerRules");
3939
startsAfter("Pregel");

tests/IResearch/IResearchAnalyzerFeature-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@ class IResearchAnalyzerFeatureCoordinatorTest : public ::testing::Test {
12251225
// We have added the feature above, so saave to dereference here
12261226
_feature =
12271227
arangodb::application_features::ApplicationServer::lookupFeature<arangodb::iresearch::IResearchAnalyzerFeature>(
1228-
"IResearchAnalyzer");
1228+
"ArangoSearchAnalyzer");
12291229
TransactionStateMock::abortTransactionCount = 0;
12301230
TransactionStateMock::beginTransactionCount = 0;
12311231
TransactionStateMock::commitTransactionCount = 0;

tests/RestServer/FlushFeature-test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,13 +451,13 @@ TEST_F(FlushFeatureTest, test_subscription_retention) {
451451
ASSERT_NE(nullptr, subscription);
452452

453453
size_t removed = 42;
454-
size_t tick = 0;
454+
TRI_voc_tick_t tick = 0;
455455
feature.releaseUnusedTicks(removed, tick);
456456
ASSERT_EQ(0, removed); // reference is being held
457457
}
458458

459459
size_t removed = 42;
460-
size_t tick = 0;
460+
TRI_voc_tick_t tick = 0;
461461
feature.releaseUnusedTicks(removed, tick);
462462
ASSERT_EQ(1, removed); // stale subscription was removed
463463
}

0 commit comments

Comments
 (0)
0