Skip to content

Commit

Permalink
Remove TODOs from MetaStateService
Browse files Browse the repository at this point in the history
7.x nodes permit the on-disk cluster metadata to omit the manifest file in
order to support upgrades from 6.x. We are similarly lenient in `master`, i.e.
8.x, but there is no need to be since we must be upgrading from a 7.x node
which ensures that the manifest file is written.

We prefer to keep this lenience (see elastic#52412) so this commit removes the
commented-out indications that it should be removed. The new metadata format
introduced in elastic#50907 means that this whole subsystem will be removed in v9
anyway.

Relates elastic#38556
  • Loading branch information
DaveCTurner committed Feb 21, 2020
1 parent ae68e4f commit 89af362
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,6 @@ private Tuple<Manifest, MetaData> loadFullStateBWC() throws IOException {
if (globalMetaData != null) {
metaDataBuilder = MetaData.builder(globalMetaData);
indexGraveyard = globalMetaData.custom(IndexGraveyard.TYPE);
// TODO https://github.com/elastic/elasticsearch/issues/38556
// assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0";
} else {
metaDataBuilder = MetaData.builder();
indexGraveyard = IndexGraveyard.builder().build();
Expand All @@ -131,8 +129,6 @@ private Tuple<Manifest, MetaData> loadFullStateBWC() throws IOException {
Tuple<IndexMetaData, Long> indexMetaDataAndGeneration =
INDEX_META_DATA_FORMAT.loadLatestStateWithGeneration(logger, namedXContentRegistry,
nodeEnv.resolveIndexFolder(indexFolderName));
// TODO https://github.com/elastic/elasticsearch/issues/38556
// assert Version.CURRENT.major < 8 : "failed to find manifest file, which is mandatory staring with Elasticsearch version 8.0";
IndexMetaData indexMetaData = indexMetaDataAndGeneration.v1();
long generation = indexMetaDataAndGeneration.v2();
if (indexMetaData != null) {
Expand Down

0 comments on commit 89af362

Please sign in to comment.