Skip to content
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

Merged
merged 12 commits into from
Oct 30, 2020
Merged

[dbnode] Read only namespaces #2803

merged 12 commits into from
Oct 30, 2020

Conversation

linasm
Copy link
Collaborator

@linasm linasm commented Oct 27, 2020

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

@linasm linasm marked this pull request as ready for review October 30, 2020 11:09
@linasm linasm changed the title WIP [dbnode] Read only namespaces [dbnode] Read only namespaces Oct 30, 2020
@@ -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
Copy link
Collaborator

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?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -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()) {
Copy link
Collaborator

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 {

Copy link
Collaborator Author

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.

Copy link
Collaborator

@arnikola arnikola left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm /w nits

@arnikola arnikola removed their assignment Oct 30, 2020
@linasm linasm merged commit 27e6a05 into master Oct 30, 2020
@linasm linasm deleted the linasm/readonly-namespaces branch October 30, 2020 14:56
soundvibe added a commit that referenced this pull request Oct 30, 2020
* 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants