Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions core/src/main/java/org/elasticsearch/index/store/Store.java
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ public MetadataSnapshot getMetadata(IndexCommit commit) throws IOException {
}
}


/**
* Renames all the given files from the key of the map to the
* value of the map. All successfully renamed files are removed from the map in-place.
Expand Down Expand Up @@ -389,7 +388,6 @@ private void closeInternal() {
}
}


/**
* Reads a MetadataSnapshot from the given index locations or returns an empty snapshot if it can't be read.
*
Expand Down Expand Up @@ -597,7 +595,7 @@ private static void failIfCorrupted(Directory directory, ShardId shardId) throws
/**
* This method deletes every file in this store that is not contained in the given source meta data or is a
* legacy checksum file. After the delete it pulls the latest metadata snapshot from the store and compares it
* to the given snapshot. If the snapshots are inconsistent an illegal state exception is thrown
* to the given snapshot. If the snapshots are inconsistent an illegal state exception is thrown.
*
* @param reason the reason for this cleanup operation logged for each deleted file
* @param sourceMetaData the metadata used for cleanup. all files in this metadata should be kept around.
Expand Down Expand Up @@ -641,9 +639,9 @@ final void verifyAfterCleanup(MetadataSnapshot sourceMetaData, MetadataSnapshot
for (StoreFileMetaData meta : recoveryDiff.different) {
StoreFileMetaData local = targetMetaData.get(meta.name());
StoreFileMetaData remote = sourceMetaData.get(meta.name());
// if we have different files the they must have no checksums otherwise something went wrong during recovery.
// we have that problem when we have an empty index is only a segments_1 file then we can't tell if it's a Lucene 4.8 file
// and therefore no checksum. That isn't much of a problem since we simply copy it over anyway but those files come out as
// if we have different files then they must have no checksums; otherwise something went wrong during recovery.
// we have that problem when we have an empty index is only a segments_1 file so we can't tell if it's a Lucene 4.8 file
// and therefore no checksum is included. That isn't a problem since we simply copy it over anyway but those files come out as
// different in the diff. That's why we have to double check here again if the rest of it matches.

// all is fine this file is just part of a commit or a segment that is different
Expand Down Expand Up @@ -676,7 +674,6 @@ static final class StoreDirectory extends FilterDirectory {
this.deletesLogger = deletesLogger;
}


@Override
public void close() throws IOException {
assert false : "Nobody should close this directory except of the Store itself";
Expand Down