Merge branch 'master' into maven/distribution-groupid
This commit is contained in:
commit
abb43c3cc6
|
@ -211,12 +211,7 @@ public class TransportIndexAction extends TransportReplicationAction<IndexReques
|
|||
}
|
||||
|
||||
if (indexShard.getTranslogDurability() == Translog.Durabilty.REQUEST && location != null) {
|
||||
try {
|
||||
indexShard.sync(location);
|
||||
} catch (EngineClosedException e) {
|
||||
// ignore, the engine is already closed and we do not want the
|
||||
// operation to be retried, because it has been modified
|
||||
}
|
||||
indexShard.sync(location);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1403,9 +1403,11 @@ public class IndexShard extends AbstractIndexShardComponent {
|
|||
* Syncs the given location with the underlying storage unless already synced.
|
||||
*/
|
||||
public void sync(Translog.Location location) {
|
||||
final Engine engine = engine();
|
||||
try {
|
||||
final Engine engine = engine();
|
||||
engine.getTranslog().ensureSynced(location);
|
||||
} catch (EngineClosedException ex) {
|
||||
// that's fine since we already synced everything on engine close - this also is conform with the methods documentation
|
||||
} catch (IOException ex) { // if this fails we are in deep shit - fail the request
|
||||
logger.debug("failed to sync translog", ex);
|
||||
throw new ElasticsearchException("failed to sync translog", ex);
|
||||
|
|
|
@ -53,7 +53,7 @@ org.joda.time.DateTime#<init>(int, int, int, int, int)
|
|||
org.joda.time.DateTime#<init>(int, int, int, int, int, int)
|
||||
org.joda.time.DateTime#<init>(int, int, int, int, int, int, int)
|
||||
org.joda.time.DateTime#now()
|
||||
org.joda.time.DateTime#getDefault()
|
||||
org.joda.time.DateTimeZone#getDefault()
|
||||
|
||||
com.google.common.collect.Iterators#emptyIterator() @ Use Collections.emptyIterator instead
|
||||
|
||||
|
|
Loading…
Reference in New Issue