Skip to content

Commit

Permalink
change feature order so that ServerIdFeature is before ReplicationFea…
Browse files Browse the repository at this point in the history
…ture (#13743)
  • Loading branch information
jsteemann authored Mar 18, 2021
1 parent 3aacae4 commit 48dba7d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
devel
-----

* Make ReplicationFeature formally depend on ServerIdFeature, because the
former relies on the server id being already loaded by the latter.
If this dependency is not established properly, it is undefined if the
ReplicationFeature starts earlier than the ServerIdFeature, which can lead
to the ReplicationFeature not sending its server id properly to the leader
when doing replication between two single servers.

* Fix potentially undefined behavior when creating a CalculationTransactionContext
for an arangosearch analyzer. An uninitialized struct member was passed as an
argument to its base class. This potentially had no observable effects, but
Expand Down
2 changes: 2 additions & 0 deletions arangod/Replication/ReplicationFeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include "Rest/GeneralResponse.h"
#include "RestServer/DatabaseFeature.h"
#include "RestServer/MetricsFeature.h"
#include "RestServer/ServerIdFeature.h"
#include "RestServer/SystemDatabaseFeature.h"
#include "StorageEngine/StorageEngineFeature.h"
#include "VocBase/vocbase.h"
Expand Down Expand Up @@ -97,6 +98,7 @@ ReplicationFeature::ReplicationFeature(ApplicationServer& server)
startsAfter<BasicFeaturePhaseServer>();

startsAfter<DatabaseFeature>();
startsAfter<ServerIdFeature>();
startsAfter<StorageEngineFeature>();
startsAfter<SystemDatabaseFeature>();
}
Expand Down

0 comments on commit 48dba7d

Please sign in to comment.