Skip to content

Commit

Permalink
Comment and blank line cleanups (#23647)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nikiforos Botis authored and nik9000 committed Mar 20, 2017
1 parent b647242 commit ae09e08
Showing 1 changed file with 4 additions and 7 deletions.
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 @@ -246,7 +246,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 @@ -372,7 +371,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 @@ -580,7 +578,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 @@ -624,9 +622,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 @@ -659,7 +657,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

0 comments on commit ae09e08

Please sign in to comment.