mirror of
https://github.com/kemko/nomad.git
synced 2026-01-01 16:05:42 +03:00
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
This commit is contained in:
3
.changelog/18494.txt
Normal file
3
.changelog/18494.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
```release-note:bug
|
||||
server: Fixed a bug where Raft server configuration parameters were not correctly merged
|
||||
```
|
||||
@@ -2083,6 +2083,18 @@ func (s *ServerConfig) Merge(b *ServerConfig) *ServerConfig {
|
||||
}
|
||||
}
|
||||
|
||||
if b.RaftSnapshotThreshold != nil {
|
||||
result.RaftSnapshotThreshold = pointer.Of(*b.RaftSnapshotThreshold)
|
||||
}
|
||||
|
||||
if b.RaftSnapshotInterval != nil {
|
||||
result.RaftSnapshotInterval = pointer.Of(*b.RaftSnapshotInterval)
|
||||
}
|
||||
|
||||
if b.RaftTrailingLogs != nil {
|
||||
result.RaftTrailingLogs = pointer.Of(*b.RaftTrailingLogs)
|
||||
}
|
||||
|
||||
if b.JobTrackedVersions != nil {
|
||||
result.JobTrackedVersions = b.JobTrackedVersions
|
||||
}
|
||||
|
||||
@@ -141,6 +141,9 @@ func TestConfig_Merge(t *testing.T) {
|
||||
ProtocolVersion: 1,
|
||||
RaftProtocol: 1,
|
||||
RaftMultiplier: pointer.Of(5),
|
||||
RaftSnapshotThreshold: pointer.Of(100),
|
||||
RaftSnapshotInterval: pointer.Of("30m"),
|
||||
RaftTrailingLogs: pointer.Of(200),
|
||||
NumSchedulers: pointer.Of(1),
|
||||
NodeGCThreshold: "1h",
|
||||
BatchEvalGCThreshold: "4h",
|
||||
@@ -377,6 +380,9 @@ func TestConfig_Merge(t *testing.T) {
|
||||
ProtocolVersion: 2,
|
||||
RaftProtocol: 2,
|
||||
RaftMultiplier: pointer.Of(6),
|
||||
RaftSnapshotThreshold: pointer.Of(100),
|
||||
RaftSnapshotInterval: pointer.Of("30m"),
|
||||
RaftTrailingLogs: pointer.Of(200),
|
||||
NumSchedulers: pointer.Of(2),
|
||||
EnabledSchedulers: []string{structs.JobTypeBatch},
|
||||
NodeGCThreshold: "12h",
|
||||
|
||||
Reference in New Issue
Block a user