Skip to content

Commit

Permalink
Add the coldWritesEnabled option to Namespace options
Browse files Browse the repository at this point in the history
  • Loading branch information
EdgeJ committed Sep 10, 2020
1 parent 8cf55a0 commit 030a255
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ NamespaceOptions defines parameters for an M3DB namespace. See https://m3db.gith
| snapshotEnabled | SnapshotEnabled controls whether snapshotting is enabled. | bool | false |
| retentionOptions | RetentionOptions sets the retention parameters. | [RetentionOptions](#retentionoptions) | false |
| indexOptions | IndexOptions sets the indexing parameters. | [IndexOptions](#indexoptions) | false |
| coldWritesEnabled | ColdWritesEnabled controls whether cold writes are enabled. | bool | false |

[Back to TOC](#table-of-contents)

Expand Down
1 change: 1 addition & 0 deletions docs/configuration/namespaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ spec:
indexOptions:
enabled: true
blockSize: 12h
coldWritesEnabled: true
```


Expand Down
3 changes: 3 additions & 0 deletions pkg/apis/m3dboperator/v1alpha1/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,7 @@ type NamespaceOptions struct {

// IndexOptions sets the indexing parameters.
IndexOptions IndexOptions `json:"indexOptions,omitempty"`

// ColdWritesEnabled controls whether cold writes are enabled.
ColdWritesEnabled bool `json:"coldWritesEnabled,omitempty"`
}
1 change: 1 addition & 0 deletions pkg/m3admin/namespace/namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ func m3dbNamespaceOptsFromSpec(opts *myspec.NamespaceOptions) (*m3ns.NamespaceOp
RetentionOptions: retentionOpts,
SnapshotEnabled: opts.SnapshotEnabled,
IndexOptions: indexOpts,
ColdWritesEnabled: opts.ColdWritesEnabled,
}, nil
}

Expand Down
2 changes: 2 additions & 0 deletions pkg/m3admin/namespace/presets.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ var (
Enabled: true,
BlockSize: (2 * time.Hour).String(),
},
ColdWritesEnabled: false,
}

presetOneMinuteFourtyDaysIndexed = myspec.NamespaceOptions{
Expand All @@ -82,5 +83,6 @@ var (
Enabled: true,
BlockSize: (24 * time.Hour).String(),
},
ColdWritesEnabled: false,
}
)

0 comments on commit 030a255

Please sign in to comment.