Skip to content

Commit

Permalink
Add ES gossip+clientConnect Timeout args re #185 (#186)
Browse files Browse the repository at this point in the history
  • Loading branch information
seclerp authored and bartelink committed Jan 16, 2020
1 parent 85a141d commit b3b6966
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ The `Unreleased` section name is replaced by the expected version of next releas
- `eqx dump` perf + logging improvements
- `eqx dump -P` turns off JSON pretty printing
- `Cosmos`: `Tip 200` now logs received `n` and `_etag` values
- `EventStore`: Add missing optional parameters for `Connector`: `gossipTimeout` and `clientConnectionTimeout`

### Changed

Expand Down
3 changes: 3 additions & 0 deletions src/Equinox.EventStore/EventStore.fs
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ type Connector
( username, password, reqTimeout: TimeSpan, reqRetries: int,
[<O; D(null)>]?log : Logger, [<O; D(null)>]?heartbeatTimeout: TimeSpan, [<O; D(null)>]?concurrentOperationsLimit,
[<O; D(null)>]?readRetryPolicy, [<O; D(null)>]?writeRetryPolicy,
[<O; D(null)>]?gossipTimeout, [<O; D(null)>]?clientConnectionTimeout,
/// Additional strings identifying the context of this connection; should provide enough context to disambiguate all potential connections to a cluster
/// NB as this will enter server and client logs, it should not contain sensitive information
[<O; D(null)>]?tags : (string*string) seq) =
Expand All @@ -644,6 +645,8 @@ type Connector
| NodePreference.Random -> s.PerformOnAnyNode().PreferRandomNode() // override default PerformOnMasterOnly(), override Master Node preference
|> fun s -> match concurrentOperationsLimit with Some col -> s.LimitConcurrentOperationsTo(col) | None -> s // ES default: 5000
|> fun s -> match heartbeatTimeout with Some v -> s.SetHeartbeatTimeout v | None -> s // default: 1500 ms
|> fun s -> match gossipTimeout with Some v -> s.SetGossipTimeout v | None -> s // default: 1000 ms
|> fun s -> match clientConnectionTimeout with Some v -> s.WithConnectionTimeoutOf v | None -> s // default: 1000 ms
|> fun s -> match log with Some log -> log.Configure s | None -> s
|> fun s -> s.Build()

Expand Down

0 comments on commit b3b6966

Please sign in to comment.