Skip to content

Commit 26546c7

Browse files
committed
correct spelling of eligible
1 parent de984dc commit 26546c7

File tree

12 files changed

+43
-43
lines changed

12 files changed

+43
-43
lines changed

src/Elasticsearch.Net/ConnectionPool/Node.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public Node(Uri uri)
1414
this.Uri = uri.Purify();
1515
this.IsAlive = true;
1616
this.HoldsData = true;
17-
this.MasterEligable = true;
17+
this.MasterEligible = true;
1818
this.IsResurrected = true;
1919
}
2020

@@ -26,8 +26,8 @@ public Node(Uri uri)
2626
/// <summary>Indicates whether this node holds data, defaults to true when unknown/unspecified</summary>
2727
public bool HoldsData { get; set; }
2828

29-
/// <summary>Indicates whether this node is master eligable, defaults to true when unknown/unspecified</summary>
30-
public bool MasterEligable { get; set; }
29+
/// <summary>Indicates whether this node is master eligible, defaults to true when unknown/unspecified</summary>
30+
public bool MasterEligible { get; set; }
3131

3232
/// <summary>The id of the node, defaults to null when unknown/unspecified</summary>
3333
public string Id { get; set; }
@@ -68,7 +68,7 @@ public Node Clone() =>
6868
Id = this.Id,
6969
Name = this.Name,
7070
HoldsData = this.HoldsData,
71-
MasterEligable = this.MasterEligable,
71+
MasterEligible = this.MasterEligible,
7272
FailedAttempts = this.FailedAttempts,
7373
DeadUntil = this.DeadUntil,
7474
IsAlive = this.IsAlive

src/Elasticsearch.Net/Transport/Pipeline/RequestPipeline.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ private void ThrowBadAuthPipelineExceptionWhenNeeded<TReturn>(ElasticsearchRespo
288288
public IEnumerable<Node> SniffNodes => this._connectionPool
289289
.CreateView((e, n)=> { using (new Auditable(e, this.AuditTrail, this._dateTimeProvider) { Node = n }) {} })
290290
.ToList()
291-
.OrderBy(n => n.MasterEligable ? n.Uri.Port : int.MaxValue);
291+
.OrderBy(n => n.MasterEligible ? n.Uri.Port : int.MaxValue);
292292

293293
public void SniffOnConnectionFailure()
294294
{

src/Elasticsearch.Net/Transport/Sniff/SniffResponse.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public IEnumerable<Node> ToNodes(bool forceHttp = false)
1616
{
1717
Name = kv.Value.name,
1818
Id = kv.Key,
19-
MasterEligable = kv.Value.MasterEligable,
19+
MasterEligible = kv.Value.MasterEligible,
2020
HoldsData = kv.Value.HoldsData,
2121
};
2222
}
@@ -34,7 +34,7 @@ internal class SniffNode
3434
public string build { get; set; }
3535
public IDictionary<string, string> settings { get; set; }
3636

37-
internal bool MasterEligable => !((this.settings?.ContainsKey("node.master")).GetValueOrDefault(false) && Convert.ToBoolean(this.settings["node.master"]) == false);
37+
internal bool MasterEligible => !((this.settings?.ContainsKey("node.master")).GetValueOrDefault(false) && Convert.ToBoolean(this.settings["node.master"]) == false);
3838
internal bool HoldsData => !((this.settings?.ContainsKey("node.data")).GetValueOrDefault(false) && Convert.ToBoolean(this.settings["node.data"]) == false);
3939
}
4040

src/Nest/Document/Multiple/Reindex/ElasticClient-Reindex.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ public partial interface IElasticClient
77
/// <summary>
88
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
99
/// </summary>
10-
/// <param name="from">the index that documents should be reindexed from</param>
11-
/// <param name="to">the index that documents should be reindexed to</param>
10+
/// <param name="from">the index that documents will be reindexed from</param>
11+
/// <param name="to">the index that documents will be reindexed to</param>
1212
/// <param name="selector">the descriptor to describe the reindex operation</param>
1313
/// <returns>An IObservable&lt;IReindexResponse&lt;T&gt;$gt; you can subscribe to to listen to the progress of the reindex process</returns>
1414
IObservable<IReindexResponse<T>> Reindex<T>(IndexName from, IndexName to, Func<ReindexDescriptor<T>, IReindexRequest> selector = null)
@@ -27,8 +27,8 @@ public partial class ElasticClient
2727
/// <summary>
2828
/// Helper method that allows you to reindex from one index into another using SCAN and SCROLL.
2929
/// </summary>
30-
/// <param name="from">the index that documents should be reindexed from</param>
31-
/// <param name="to">the index that documents should be reindexed to</param>
30+
/// <param name="from">the index that documents will be reindexed from</param>
31+
/// <param name="to">the index that documents will be reindexed to</param>
3232
/// <param name="selector">the descriptor to describe the reindex operation</param>
3333
/// <returns>An IObservable&lt;IReindexResponse&lt;T&gt;$gt; you can subscribe to to listen to the progress of the reindex process</returns>
3434
public IObservable<IReindexResponse<T>> Reindex<T>(IndexName from, IndexName to, Func<ReindexDescriptor<T>, IReindexRequest> selector = null)

src/Tests/ClientConcepts/ConnectionPooling/BuildingBlocks/ConnectionPooling.Doc.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,13 +87,13 @@ [U] public void Sniffing()
8787

8888
/** Or using an enumerable of `Node`
8989
* A major benefit here is you can include known node roles when seeding
90-
* NEST can use this information to favour sniffing on master eligable nodes first
91-
* and take master only nodes out of rotation for issueing client calls on.
90+
* NEST can use this information to favour sniffing on master eligible nodes first
91+
* and take master only nodes out of rotation for issuing client calls on.
9292
*/
9393
var nodes = uris.Select(u=>new Node(u));
9494
pool = new SniffingConnectionPool(nodes);
9595

96-
/** This type of pool is hardwirted to optout out sniffing*/
96+
/** This type of pool is hardwired to opt out of sniffing*/
9797
pool.SupportsReseeding.Should().BeTrue();
9898

9999
/** but supports pinging when enabled */

src/Tests/ClientConcepts/ConnectionPooling/BuildingBlocks/KeepingTrackOfNodes.Doc.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ [U] public void Creating()
1818
node.Uri.Should().NotBeNull();
1919
node.Uri.Port.Should().Be(9200);
2020

21-
/** By default master eligable and holds data is presumed to be true **/
22-
node.MasterEligable.Should().BeTrue();
21+
/** By default master eligible and holds data is presumed to be true **/
22+
node.MasterEligible.Should().BeTrue();
2323
node.HoldsData.Should().BeTrue();
2424
/** Is resurrected is true on first usage, hints to the transport that a ping might be useful */
2525
node.IsResurrected.Should().BeTrue();
@@ -69,8 +69,8 @@ [U] public void MarkNodes()
6969
[U] public void Equality()
7070
{
7171
/** Nodes are considered equal if they have the same endpoint no matter what other metadata is associated */
72-
var node = new Node(new Uri("http://localhost:9200")) { MasterEligable = false };
73-
var nodeAsMaster = new Node(new Uri("http://localhost:9200")) { MasterEligable = true };
72+
var node = new Node(new Uri("http://localhost:9200")) { MasterEligible = false };
73+
var nodeAsMaster = new Node(new Uri("http://localhost:9200")) { MasterEligible = true };
7474
(node == nodeAsMaster).Should().BeTrue();
7575
(node != nodeAsMaster).Should().BeFalse();
7676
var uri = new Uri("http://localhost:9200");

src/Tests/ClientConcepts/ConnectionPooling/Sniffing/OnConnectionFailure.doc.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ [U] public async Task DoesASniffAfterConnectionFailure()
2121
{
2222
/**
2323
* Here we seed our connection with 5 known nodes 9200-9204 of which we think
24-
* 9202, 9203, 9204 are master eligable nodes. Our virtualized cluster will throw once when doing
24+
* 9202, 9203, 9204 are master eligible nodes. Our virtualized cluster will throw once when doing
2525
* a search on 9201. This should a sniff to be kicked off.
2626
*/
2727
var audit = new Auditor(() => Framework.Cluster
2828
.Nodes(5)
29-
.MasterEligable(9202, 9203, 9204)
29+
.MasterEligible(9202, 9203, 9204)
3030
.ClientCalls(r => r.SucceedAlways())
3131
.ClientCalls(r => r.OnPort(9201).Fails(Once))
3232
/**
@@ -36,15 +36,15 @@ [U] public async Task DoesASniffAfterConnectionFailure()
3636
*/
3737
.Sniff(p => p.SucceedAlways(Framework.Cluster
3838
.Nodes(3)
39-
.MasterEligable(9200, 9202)
39+
.MasterEligible(9200, 9202)
4040
.ClientCalls(r => r.OnPort(9201).Fails(Once))
4141
/**
4242
* After this second failure on 9201 another sniff will be returned a cluster that no
4343
* longer fails but looks completely different (9210-9212) we should be able to handle this
4444
*/
4545
.Sniff(s => s.SucceedAlways(Framework.Cluster
4646
.Nodes(3, 9210)
47-
.MasterEligable(9210, 9212)
47+
.MasterEligible(9210, 9212)
4848
.ClientCalls(r => r.SucceedAlways())
4949
.Sniff(r => r.SucceedAlways())
5050
))
@@ -95,15 +95,15 @@ [U] public async Task DoesASniffAfterConnectionFailureOnPing()
9595
*/
9696
var audit = new Auditor(() => Framework.Cluster
9797
.Nodes(5)
98-
.MasterEligable(9202, 9203, 9204)
98+
.MasterEligible(9202, 9203, 9204)
9999
.Ping(r => r.OnPort(9201).Fails(Once))
100100
.Sniff(p => p.SucceedAlways(Framework.Cluster
101101
.Nodes(3)
102-
.MasterEligable(9200, 9202)
102+
.MasterEligible(9200, 9202)
103103
.Ping(r => r.OnPort(9201).Fails(Once))
104104
.Sniff(s => s.SucceedAlways(Framework.Cluster
105105
.Nodes(3, 9210)
106-
.MasterEligable(9210, 9211)
106+
.MasterEligible(9210, 9211)
107107
.Ping(r => r.SucceedAlways())
108108
.Sniff(r => r.SucceedAlways())
109109
))

src/Tests/ClientConcepts/ConnectionPooling/Sniffing/OnStaleClusterState.doc.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ public async Task ASniffOnStartupHappens()
2424
{
2525
var audit = new Auditor(() => Framework.Cluster
2626
.Nodes(10)
27-
.MasterEligable(9202, 9203, 9204)
27+
.MasterEligible(9202, 9203, 9204)
2828
.ClientCalls(r => r.SucceedAlways())
2929
.Sniff(s => s.SucceedAlways(Framework.Cluster
3030
.Nodes(100)
31-
.MasterEligable(9202, 9203, 9204)
31+
.MasterEligible(9202, 9203, 9204)
3232
.ClientCalls(r => r.SucceedAlways())
3333
.Sniff(ss => ss.SucceedAlways(Framework.Cluster
3434
.Nodes(10)
35-
.MasterEligable(9202, 9203, 9204)
35+
.MasterEligible(9202, 9203, 9204)
3636
.ClientCalls(r => r.SucceedAlways())
3737
))
3838
))

src/Tests/ClientConcepts/ConnectionPooling/Sniffing/OnStartup.doc.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ public async Task SniffPrefersMasterNodes()
120120
{
121121
var audit = new Auditor(() => Framework.Cluster
122122
.Nodes(new[] {
123-
new Node(new Uri("http://localhost:9200")) { MasterEligable = false },
124-
new Node(new Uri("http://localhost:9201")) { MasterEligable = false },
125-
new Node(new Uri("http://localhost:9202")) { MasterEligable = true },
123+
new Node(new Uri("http://localhost:9200")) { MasterEligible = false },
124+
new Node(new Uri("http://localhost:9201")) { MasterEligible = false },
125+
new Node(new Uri("http://localhost:9202")) { MasterEligible = true },
126126
})
127127
.Sniff(s => s.Succeeds(Always))
128128
.SniffingConnectionPool()
@@ -142,9 +142,9 @@ public async Task SniffPrefersMasterNodesButStillFailsOver()
142142
{
143143
var audit = new Auditor(() => Framework.Cluster
144144
.Nodes(new[] {
145-
new Node(new Uri("http://localhost:9200")) { MasterEligable = true },
146-
new Node(new Uri("http://localhost:9201")) { MasterEligable = true },
147-
new Node(new Uri("http://localhost:9202")) { MasterEligable = false },
145+
new Node(new Uri("http://localhost:9200")) { MasterEligible = true },
146+
new Node(new Uri("http://localhost:9201")) { MasterEligible = true },
147+
new Node(new Uri("http://localhost:9202")) { MasterEligible = false },
148148
})
149149
.Sniff(s => s.Fails(Always))
150150
.Sniff(s => s.OnPort(9202).Succeeds(Always))

src/Tests/ClientConcepts/ConnectionPooling/Sniffing/RoleDetection.doc.cs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public class RoleDetection
1616
{
1717
/** == Sniffing role detection
1818
*
19-
* When we sniff the custer state we detect the role of the node whether its master eligable and holds data
19+
* When we sniff the custer state we detect the role of the node whether its master eligible and holds data
2020
* We use this information when selecting a node to perform an API call on.
2121
*/
2222
[U, SuppressMessage("AsyncUsage", "AsyncFixer001:Unnecessary async/await usage", Justification = "Its a test")]
@@ -26,7 +26,7 @@ public async Task DetectsMasterNodes()
2626
.Nodes(10)
2727
.Sniff(s => s.Fails(Always))
2828
.Sniff(s => s.OnPort(9202)
29-
.Succeeds(Always, Framework.Cluster.Nodes(8).MasterEligable(9200, 9201, 9202))
29+
.Succeeds(Always, Framework.Cluster.Nodes(8).MasterEligible(9200, 9201, 9202))
3030
)
3131
.SniffingConnectionPool()
3232
.AllDefaults()
@@ -36,13 +36,13 @@ public async Task DetectsMasterNodes()
3636
{
3737
pool.Should().NotBeNull();
3838
pool.Nodes.Should().HaveCount(10);
39-
pool.Nodes.Where(n => n.MasterEligable).Should().HaveCount(10);
39+
pool.Nodes.Where(n => n.MasterEligible).Should().HaveCount(10);
4040
},
4141
AssertPoolAfterCall = (pool) =>
4242
{
4343
pool.Should().NotBeNull();
4444
pool.Nodes.Should().HaveCount(8);
45-
pool.Nodes.Where(n => n.MasterEligable).Should().HaveCount(3);
45+
pool.Nodes.Where(n => n.MasterEligible).Should().HaveCount(3);
4646
}
4747
};
4848
await audit.TraceStartup();
@@ -103,11 +103,11 @@ public RealWorldRoleDetection(SniffRoleDetectionCluster cluster)
103103
[I] public async Task SniffPicksUpRoles()
104104
{
105105
var node = SniffAndReturnNode();
106-
node.MasterEligable.Should().BeTrue();
106+
node.MasterEligible.Should().BeTrue();
107107
node.HoldsData.Should().BeFalse();
108108

109109
node = await SniffAndReturnNodeAsync();
110-
node.MasterEligable.Should().BeTrue();
110+
node.MasterEligible.Should().BeTrue();
111111
node.HoldsData.Should().BeFalse();
112112
}
113113

0 commit comments

Comments
 (0)