Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public abstract class DocWriteResponse extends ReplicationResponse implements Wr
private static final String FORCED_REFRESH = "forced_refresh";

/**
* An enum that represents the the results of CRUD operations, primarily used to communicate the type of
* An enum that represents the results of CRUD operations, primarily used to communicate the type of
* operation that occurred.
*/
public enum Result implements Writeable {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void buildTaskGroups() {
// we found parent in the list of tasks - add it to the parent list
parentTask.addGroup(taskGroup);
} else {
// we got zombie or the parent was filtered out - add it to the the top task list
// we got zombie or the parent was filtered out - add it to the top task list
topLevelTasks.add(taskGroup);
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public boolean needToCheck() {

/**
* Should the index be auto created?
* @throws IndexNotFoundException if the the index doesn't exist and shouldn't be auto created
* @throws IndexNotFoundException if the index doesn't exist and shouldn't be auto created
*/
public boolean shouldAutoCreate(String index, ClusterState state) {
if (resolver.hasIndexOrAlias(index, state)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ public interface Primary<
public interface Replicas<RequestT extends ReplicationRequest<RequestT>> {

/**
* Performs the the specified request on the specified replica.
* Performs the specified request on the specified replica.
*
* @param replica the shard this request should be executed on
* @param replicaRequest the operation to perform
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public String getId() {
}

/**
* The unique ephemeral id of the node. Ephemeral ids are meant to be attached the the life span
* The unique ephemeral id of the node. Ephemeral ids are meant to be attached the life span
* of a node process. When ever a node is restarted, it's ephemeral id is required to change (while it's {@link #getId()}
* will be read from the data folder and will remain the same across restarts). Since all node attributes and addresses
* are maintained during the life span of a node process, we can (and are) using the ephemeralId in
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@
import java.util.Locale;
import java.util.Map;
import java.util.Optional;
import java.util.OptionalDouble;
import java.util.Set;
import java.util.stream.Collectors;

import static java.util.Collections.emptyMap;

Expand Down Expand Up @@ -402,7 +400,7 @@ private static class NodeRankComparator implements Comparator<ShardRouting> {
@Override
public int compare(ShardRouting s1, ShardRouting s2) {
if (s1.currentNodeId().equals(s2.currentNodeId())) {
// these shards on the the same node
// these shards on the same node
return 0;
}
Double shard1rank = nodeRanks.get(s1.currentNodeId());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ private XContentParserUtils() {
}

/**
* Makes sure that current token is of type {@link XContentParser.Token#FIELD_NAME} and the the field name is equal to the provided one
* Makes sure that current token is of type {@link XContentParser.Token#FIELD_NAME} and the field name is equal to the provided one
* @throws ParsingException if the token is not of type {@link XContentParser.Token#FIELD_NAME} or is not equal to the given field name
*/
public static void ensureFieldName(XContentParser parser, Token token, String fieldName) throws IOException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class VersionValue implements Accountable {

/** the seq number of the operation that last changed the associated uuid */
final long seqNo;
/** the the term of the operation that last changed the associated uuid */
/** the term of the operation that last changed the associated uuid */
final long term;

VersionValue(long version, long seqNo, long term) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.io.stream.StreamOutput;
import org.elasticsearch.common.io.stream.Writeable;
import org.elasticsearch.common.xcontent.ToXContent.Params;
import org.elasticsearch.common.xcontent.ToXContentFragment;
import org.elasticsearch.common.xcontent.XContentBuilder;

Expand All @@ -42,7 +41,7 @@ public class SeqNoStats implements ToXContentFragment, Writeable {
public SeqNoStats(long maxSeqNo, long localCheckpoint, long globalCheckpoint) {
assert localCheckpoint <= maxSeqNo:
"local checkpoint [" + localCheckpoint + "] is above maximum seq no [" + maxSeqNo + "]";
// note that the the global checkpoint can be higher from both maxSeqNo and localCheckpoint
// note that the global checkpoint can be higher from both maxSeqNo and localCheckpoint
// as we use this stats object to describe lucene commits as well as live statistic.
this.maxSeqNo = maxSeqNo;
this.localCheckpoint = localCheckpoint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,7 @@ private void verifyRelocatingState() {
}
}

@Override
public IndexShardState state() {
return state;
}
Expand Down Expand Up @@ -1346,6 +1347,7 @@ public RecoveryStats recoveryStats() {
* Returns the current {@link RecoveryState} if this shard is recovering or has been recovering.
* Returns null if the recovery has not yet started or shard was not recovered (created via an API).
*/
@Override
public RecoveryState recoveryState() {
return this.recoveryState;
}
Expand Down Expand Up @@ -1757,7 +1759,7 @@ public void updateGlobalCheckpointOnReplica(final long globalCheckpoint, final S
* case that the global checkpoint update from the primary is ahead of the local checkpoint on this shard. In this case, we
* ignore the global checkpoint update. This can happen if we are in the translog stage of recovery. Prior to this, the engine
* is not opened and this shard will not receive global checkpoint updates, and after this the shard will be contributing to
* calculations of the the global checkpoint. However, we can not assert that we are in the translog stage of recovery here as
* calculations of the global checkpoint. However, we can not assert that we are in the translog stage of recovery here as
* while the global checkpoint update may have emanated from the primary when we were in that state, we could subsequently move
* to recovery finalization, or even finished recovery before the update arrives here.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private void releaseDelayedOperations() {
* - blockOperations can be called on a recovery thread which can be expected to be interrupted when recovery is cancelled;
* interruptions are bad here as permit acquisition will throw an interrupted exception which will be swallowed by
* the threaded action listener if the queue of the thread pool on which it submits is full
* - if a permit is acquired and the queue of the thread pool which the the threaded action listener uses is full, the
* - if a permit is acquired and the queue of the thread pool which the threaded action listener uses is full, the
* onFailure handler is executed on the calling thread; this should not be the recovery thread as it would delay the
* recovery
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public <FactoryType> FactoryType compile(Script script, ScriptContext<FactoryTyp

if (type == ScriptType.STORED) {
// * lang and options will both be null when looking up a stored script,
// so we must get the source to retrieve the them before checking if the
// so we must get the source to retrieve them before checking if the
// context is supported
// * a stored script must be pulled from the cluster state every time in case
// the script has been updated since the last compilation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public void close() throws IOException {
/**
* Build the service.
*
* @param clusterSettings if non null the the {@linkplain TransportService} will register with the {@link ClusterSettings} for settings
* @param clusterSettings if non null, the {@linkplain TransportService} will register with the {@link ClusterSettings} for settings
* updates for {@link #TRACE_LOG_EXCLUDE_SETTING} and {@link #TRACE_LOG_INCLUDE_SETTING}.
*/
public TransportService(Settings settings, Transport transport, ThreadPool threadPool, TransportInterceptor transportInterceptor,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
package org.elasticsearch.index.engine;

import com.carrotsearch.hppc.cursors.ObjectObjectCursor;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
Expand Down Expand Up @@ -2848,7 +2849,7 @@ public void run() {
}

/**
* Tests that when the the close method returns the engine is actually guaranteed to have cleaned up and that resources are closed
* Tests that when the close method returns the engine is actually guaranteed to have cleaned up and that resources are closed
*/
public void testConcurrentEngineClosed() throws BrokenBarrierException, InterruptedException {
Thread[] closingThreads = new Thread[3];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ public void testUpdateAllocationIdsFromMaster() throws Exception {
/**
* If we do not update the global checkpoint in {@link GlobalCheckpointTracker#markAllocationIdAsInSync(String, long)} after adding the
* allocation ID to the in-sync set and removing it from pending, the local checkpoint update that freed the thread waiting for the
* local checkpoint to advance could miss updating the global checkpoint in a race if the the waiting thread did not add the allocation
* local checkpoint to advance could miss updating the global checkpoint in a race if the waiting thread did not add the allocation
* ID to the in-sync set and remove it from the pending set before the local checkpoint updating thread executed the global checkpoint
* update. This test fails without an additional call to {@link GlobalCheckpointTracker#updateGlobalCheckpointOnPrimary()} after
* removing the allocation ID from the pending set in {@link GlobalCheckpointTracker#markAllocationIdAsInSync(String, long)} (even if a
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ public void testNestedSortBothThrows() throws IOException {
}

/**
* Test the the nested Filter gets rewritten
* Test the nested Filter gets rewritten
*/
public void testNestedRewrites() throws IOException {
FieldSortBuilder sortBuilder = new FieldSortBuilder(MAPPED_STRING_FIELDNAME);
Expand All @@ -389,7 +389,7 @@ public QueryBuilder doRewrite(QueryRewriteContext queryShardContext) throws IOEx
}

/**
* Test the the nested sort gets rewritten
* Test the nested sort gets rewritten
*/
public void testNestedSortRewrites() throws IOException {
FieldSortBuilder sortBuilder = new FieldSortBuilder(MAPPED_STRING_FIELDNAME);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ public void testNestedSortBothThrows() throws IOException {
}

/**
* Test the the nested Filter gets rewritten
* Test the nested Filter gets rewritten
*/
public void testNestedRewrites() throws IOException {
GeoDistanceSortBuilder sortBuilder = new GeoDistanceSortBuilder("fieldName", 0.0, 0.0);
Expand All @@ -605,7 +605,7 @@ public QueryBuilder doRewrite(QueryRewriteContext queryShardContext) throws IOEx
}

/**
* Test the the nested sort gets rewritten
* Test the nested sort gets rewritten
*/
public void testNestedSortRewrites() throws IOException {
GeoDistanceSortBuilder sortBuilder = new GeoDistanceSortBuilder("fieldName", 0.0, 0.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import org.elasticsearch.index.fielddata.fieldcomparator.BytesRefFieldComparatorSource;
import org.elasticsearch.index.fielddata.fieldcomparator.DoubleValuesComparatorSource;
import org.elasticsearch.index.mapper.TypeFieldMapper;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.QueryShardContext;
import org.elasticsearch.index.query.MatchNoneQueryBuilder;
import org.elasticsearch.index.query.QueryBuilder;
import org.elasticsearch.index.query.QueryBuilders;
import org.elasticsearch.index.query.QueryRewriteContext;
import org.elasticsearch.index.query.QueryShardContext;
import org.elasticsearch.index.query.RangeQueryBuilder;
import org.elasticsearch.script.Script;
import org.elasticsearch.script.ScriptType;
Expand Down Expand Up @@ -360,7 +360,7 @@ public void testNestedSortBothThrows() throws IOException {
}

/**
* Test the the nested Filter gets rewritten
* Test the nested Filter gets rewritten
*/
public void testNestedRewrites() throws IOException {
ScriptSortBuilder sortBuilder = new ScriptSortBuilder(mockScript("something"), ScriptSortType.STRING);
Expand All @@ -377,7 +377,7 @@ public QueryBuilder doRewrite(QueryRewriteContext queryShardContext) throws IOEx
}

/**
* Test the the nested sort gets rewritten
* Test the nested sort gets rewritten
*/
public void testNestedSortRewrites() throws IOException {
ScriptSortBuilder sortBuilder = new ScriptSortBuilder(mockScript("something"), ScriptSortType.STRING);
Expand Down
2 changes: 1 addition & 1 deletion docs/painless/painless-operators.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ Note that def types will be assumed to be of the boolean type. Any def type eva
*Examples:*
[source,Java]
----
boolean x = !false; // declares the boolean variable x and sets it to the the opposite of the false value
boolean x = !false; // declares the boolean variable x and sets it to the opposite of the false value
boolean y = !x; // declares the boolean variable y and sets it to the opposite of the boolean variable x
def z = !y; // declares the def variable z and sets it to the opposite of the boolean variable y
----
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/docs/delete-by-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ The number of documents that were successfully deleted.

`batches`::

The number of scroll responses pulled back by the the delete by query.
The number of scroll responses pulled back by the delete by query.

`version_conflicts`::

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/docs/reindex.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -616,7 +616,7 @@ The number of documents that were successfully created.

`batches`::

The number of scroll responses pulled back by the the reindex.
The number of scroll responses pulled back by the reindex.

`version_conflicts`::

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/docs/update-by-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ The number of documents that were successfully updated.

`batches`::

The number of scroll responses pulled back by the the update by query.
The number of scroll responses pulled back by the update by query.

`version_conflicts`::

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/ingest/ingest-node.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ into:
// NOTCONSOLE

If there is already a `bar` field nested under `foo` then
this processor merges the the `foo.bar` field into it. If the field is
this processor merges the `foo.bar` field into it. If the field is
a scalar value then it will turn that field into an array field.

For example, the following document:
Expand Down Expand Up @@ -2054,7 +2054,7 @@ Consider the following document:
--------------------------------------------------
// NOTCONSOLE

Then the the `foo` needs to be renamed first before the `dot_expander`
Then the `foo` needs to be renamed first before the `dot_expander`
processor is applied. So in order for the `foo.bar` field to properly
be expanded into the `bar` field under the `foo` field the following
pipeline should be used:
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/modules/scripting/engine.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include-tagged::{plugins-examples-dir}/script-expert-scoring/src/main/java/org/e
--------------------------------------------------

You can execute the script by specifying its `lang` as `expert_scripts`, and the name
of the script as the the script source:
of the script as the script source:


[source,js]
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/query-dsl/percolate-query.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ GET /my-index/_search

<1> The version is optional, but useful in certain cases. We can ensure that we are trying to percolate
the document we just have indexed. A change may be made after we have indexed, and if that is the
case the then the search request would fail with a version conflict error.
case the search request would fail with a version conflict error.

The search response returned is identical as in the previous example.

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/setup/upgrade/upgrade-node.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ To upgrade using a zip or compressed tarball:
.. Extract the zip or tarball to a _new_ directory. This is critical if you
are not using external `config` and `data` directories.

.. Set the the `ES_PATH_CONF` environment variable to specify the location of
.. Set the `ES_PATH_CONF` environment variable to specify the location of
your external `config` directory and `jvm.options` file. If you are not
using an external `config` directory, copy your old configuration
over to the new installation.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public class TribeIntegrationTests extends ESIntegTestCase {
private static final Predicate<InternalTestCluster> CLUSTER2_ONLY = c -> c.getClusterName().equals(cluster2.getClusterName());

/**
* A predicate that is used to select the the two remote clusters
* A predicate that is used to select the two remote clusters
**/
private static final Predicate<InternalTestCluster> ALL = c -> true;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public interface GceInstancesService {

/**
* cloud.gce.max_wait: How long exponential backoff should retry before definitely failing.
* It's a total time since the the initial call is made.
* It's a total time since the initial call is made.
* A negative value will retry indefinitely. Defaults to `-1s` (retry indefinitely).
*/
Setting<TimeValue> MAX_WAIT_SETTING =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ public void testLazyLoading() throws Exception {
Files.copy(new ByteArrayInputStream(StreamsUtils.copyToBytesFromClasspath("/GeoLite2-Country.mmdb.gz")),
geoIpConfigDir.resolve("GeoLite2-Country.mmdb.gz"));

// Loading another database reader instances, because otherwise we can't test lazy loading as the the
// Loading another database reader instances, because otherwise we can't test lazy loading as the
// database readers used at class level are reused between tests. (we want to keep that otherwise running this
// test will take roughly 4 times more time)
Map<String, DatabaseReaderLazyLoader> databaseReaders =
Expand Down
2 changes: 1 addition & 1 deletion qa/vagrant/src/test/resources/packaging/utils/utils.bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# This file contains some utilities to test the the .deb/.rpm
# This file contains some utilities to test the .deb/.rpm
# packages and the SysV/Systemd scripts.

# WARNING: This testing file must be executed as root and can
Expand Down
Loading