-
Notifications
You must be signed in to change notification settings - Fork 452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[dbnode] Read only namespaces #2803
Conversation
src/dbnode/namespace/types.go
Outdated
@@ -213,7 +213,7 @@ type SchemaRegistry interface { | |||
|
|||
// Metadata represents namespace metadata information | |||
type Metadata interface { | |||
// Equal returns true if the provide value is equal to this one | |||
// Equal returns true if the provided value is equal to this one |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; mind adding .
to all of these including the existing ones?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
src/dbnode/storage/namespace.go
Outdated
@@ -1256,7 +1266,7 @@ func (n *dbNamespace) ColdFlush(flushPersist persist.FlushPreparer) error { | |||
|
|||
// If repair is enabled we still need cold flush regardless of whether cold writes is | |||
// enabled since repairs are dependent on the cold flushing logic. | |||
if !n.nopts.ColdWritesEnabled() && !n.nopts.RepairEnabled() { | |||
if n.ReadOnly() || !(n.nopts.ColdWritesEnabled() || n.nopts.RepairEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit; may be clearer to read as the following so the logic is more explicit
repairEnabled := !n.nopts.ColdWritesEnabled() && !n.nopts.RepairEnabled()
if n.ReadOnly() || repairEnabled {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will do it, but in a bit different way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm /w nits
* master: [query] count_values label naming fixes (#2805) [dbnode] Read only namespaces (#2803) Remove old code: m3nsch (#2822) Update issue templates Update issue templates [proto] Allow zero-alloc reuse of AggregatedMetric protobuf payloads (#2823) Remove old code: aggregator/handler/trafficcontrol (#2821) Remove old code: aggregation/quantile/tdigest (#2820) AddToReset config to change Add transforms to Reset transforms (#2817) [metrics/rules] Add test to assert that mixed-mode keepOriginal uses keepOriginal=true (#2819) [dbnode] Update return unfulfilled for corrupt commit log files default (#2807) [dbnode] Move eviction logic up before ns loop (#2812) [query] Add additional parser tests (#2811) [config] Remove deprecated configuration fields (#2771)
What this PR does / why we need it:
Adds support for read only namespaces.
Special notes for your reviewer:
Does this PR introduce a user-facing and/or backwards incompatible change?:
NONE
Does this PR require updating code package or user-facing documentation?:
NONE