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

[cluster] Store shards in sorted form #2890

Merged
merged 2 commits into from
Nov 13, 2020
Merged

[cluster] Store shards in sorted form #2890

merged 2 commits into from
Nov 13, 2020

Conversation

vdarulis
Copy link
Collaborator

What this PR does / why we need it:

Pretty much all Shards() API calls in use are either .All() or .Shard()/Contains(), and .All() always re-sorts the backing map to produce a sorted list of shards.

m3dbnode doesn't use it heavily, as it manages routing via it's own shardset wrapper. However, m3aggregator does - and it does it over a contended lock - even though it usually is 5 to 30-40 shards, it gets really expensive fast, especially if it has to be done multiple times for staged placements/diffing.
This change trades slower init via NewShards() and .Add() (the latter is barely used) for much faster .All() calls.
While the slowdown in less frequent calls is 1-5x, the speedup is at least an order of magnitude.

name                                    old time/op    new time/op    delta
NewShards/16_shards-12                     590ns ± 1%    1445ns ± 1%  +144.92%  (p=0.000 n=10+10)
NewShards/64_shards-12                    2.27µs ± 1%    6.61µs ± 1%  +190.92%  (p=0.000 n=10+9)
NewShards/256_shards-12                   8.92µs ± 0%   35.67µs ± 1%  +299.99%  (p=0.000 n=9+9)
NewShards/1024_shards-12                  35.3µs ± 1%   194.1µs ± 3%  +449.58%  (p=0.000 n=9+10)
NewShards/4096_shards-12                   147µs ± 1%     946µs ± 1%  +543.48%  (p=0.000 n=9+10)
ShardsAllShards/16_shards-12              1.05µs ± 1%    0.09µs ± 1%   -91.31%  (p=0.000 n=9+10)
ShardsAllShards/64_shards-12              6.75µs ± 2%    0.21µs ± 1%   -96.88%  (p=0.000 n=9+10)
ShardsAllShards/256_shards-12             34.9µs ± 2%     0.7µs ± 1%   -97.92%  (p=0.000 n=10+10)
ShardsAllShards/1024_shards-12             172µs ± 0%       3µs ± 1%   -98.21%  (p=0.000 n=6+10)
ShardsAllShards/4096_shards-12             834µs ± 1%      16µs ± 1%   -98.05%  (p=0.000 n=8+9)
ShardsAllShardIDs/16_shards-12             574ns ± 1%      66ns ± 1%   -88.49%  (p=0.000 n=10+10)
ShardsAllShardIDs/64_shards-12            4.27µs ± 1%    0.22µs ± 0%   -94.90%  (p=0.000 n=10+8)
ShardsAllShardIDs/256_shards-12           22.0µs ± 1%     0.8µs ± 1%   -96.35%  (p=0.000 n=10+10)
ShardsAllShardIDs/1024_shards-12           104µs ± 2%       4µs ± 1%   -96.60%  (p=0.000 n=10+10)
ShardsAllShardIDs/4096_shards-12           484µs ± 1%      16µs ± 1%   -96.60%  (p=0.000 n=10+9)
ShardsAdd/16_shards-12                    1.21µs ± 2%    2.02µs ± 2%   +67.24%  (p=0.000 n=9+10)
ShardsAdd/64_shards-12                    5.35µs ± 0%    9.83µs ± 1%   +83.89%  (p=0.000 n=8+10)
ShardsAdd/256_shards-12                   21.2µs ± 0%    49.4µs ± 1%  +133.47%  (p=0.000 n=8+10)
ShardsAdd/1024_shards-12                  83.7µs ± 0%   246.4µs ± 3%  +194.29%  (p=0.000 n=9+10)
ShardsAdd/4096_shards-12                   349µs ± 1%    1700µs ± 1%  +386.85%  (p=0.000 n=9+9)
ShardsEquals/16_shards-12                 2.49µs ± 1%    0.33µs ± 1%   -86.82%  (p=0.000 n=10+10)
ShardsEquals/64_shards-12                 14.7µs ± 1%     1.1µs ± 1%   -92.32%  (p=0.000 n=9+10)
ShardsEquals/256_shards-12                74.2µs ± 2%     4.4µs ± 2%   -94.03%  (p=0.000 n=10+9)
ShardsEquals/1024_shards-12                359µs ± 1%      18µs ± 0%   -95.00%  (p=0.000 n=9+10)
ShardsEquals/4096_shards-12               1.73ms ± 2%    0.08ms ± 0%   -95.35%  (p=0.000 n=10+8)
ShardsNumShardsForState/16_shards-12       205ns ± 1%      35ns ± 0%   -82.87%  (p=0.000 n=8+7)
ShardsNumShardsForState/64_shards-12       738ns ± 3%     137ns ± 1%   -81.40%  (p=0.000 n=9+9)
ShardsNumShardsForState/256_shards-12     3.22µs ± 2%    0.53µs ± 2%   -83.49%  (p=0.000 n=10+9)
ShardsNumShardsForState/1024_shards-12    13.2µs ± 2%     2.5µs ± 1%   -81.32%  (p=0.000 n=10+10)
ShardsNumShardsForState/4096_shards-12    53.1µs ± 1%    11.3µs ± 2%   -78.79%  (p=0.000 n=9+10)
ShardsShard/16_shards-12                  18.0ns ± 1%    18.7ns ± 1%    +3.65%  (p=0.000 n=9+10)
ShardsShard/64_shards-12                  19.1ns ± 3%    19.6ns ± 2%    +2.50%  (p=0.002 n=9+9)
ShardsShard/256_shards-12                 21.4ns ± 3%    21.3ns ± 2%      ~     (p=0.642 n=10+10)
ShardsShard/1024_shards-12                23.5ns ± 1%    24.0ns ± 1%    +2.30%  (p=0.000 n=10+10)
ShardsShard/4096_shards-12                26.1ns ± 2%    26.7ns ± 2%    +2.19%  (p=0.000 n=10+10)
ShardsContains/16_shards-12               17.3ns ± 3%    17.5ns ± 1%    +1.34%  (p=0.003 n=9+10)
ShardsContains/64_shards-12               18.2ns ± 0%    17.9ns ± 1%    -1.76%  (p=0.000 n=7+10)
ShardsContains/256_shards-12              20.0ns ± 0%    20.8ns ± 2%    +4.22%  (p=0.000 n=6+9)
ShardsContains/1024_shards-12             23.2ns ± 2%    24.0ns ± 2%    +3.23%  (p=0.000 n=10+10)
ShardsContains/4096_shards-12             26.4ns ± 3%    26.2ns ± 1%      ~     (p=0.341 n=10+10)

name                                    old allocs/op  new allocs/op  delta
NewShards/4096_shards-12                    3.00 ± 0%      6.00 ± 0%  +100.00%  (p=0.000 n=10+10)
ShardsAllShards/4096_shards-12              2.00 ± 0%      1.00 ± 0%   -50.00%  (p=0.000 n=10+10)
ShardsAllShardIDs/4096_shards-12            2.00 ± 0%      1.00 ± 0%   -50.00%  (p=0.000 n=10+10)
ShardsAdd/4096_shards-12                     137 ± 0%       155 ± 0%   +13.14%  (p=0.000 n=10+7)
ShardsEquals/4096_shards-12                 4.00 ± 0%      1.00 ± 0%   -75.00%  (p=0.000 n=10+10)

NB: benches ran on a busy laptop, so the very short calls have noisy values.

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

}

func (ss shards) Add(shard Shard) {
ss.shardsMap[shard.ID()] = shard
func (ss *shards) Add(shard Shard) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: maybe worth adding a couple of sanity tests on this one if they don't already exist? I expect they may not since the previous implementation was trivial (not that this implementation is all that complex either ofc).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

return
}

ss.shards = append(ss.shards, shard)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: maybe worth a comment explaining this? i.e. "insert into the middle by adding to the end and then shifting data".

Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that shards are added relatively rarely, might simply add to the end and sort.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think the small complexity add is worth the fact that won't surprise you with a slowdown of an order of magnitude.

return
}

ss.shards = append(ss.shards, shard)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Given that shards are added relatively rarely, might simply add to the end and sort.

@vdarulis vdarulis merged commit b306e81 into master Nov 13, 2020
@vdarulis vdarulis deleted the v/shards branch November 13, 2020 22:35
anuprout added a commit to anuprout/m3 that referenced this pull request Feb 9, 2021
…as downsample option is set to "all : false" (#2)

* [dbnode] Refactor wide query path (m3db#2826)

* [dbnode] Introduce Aggregator type (m3db#2840)

* Improve some slow tests (m3db#2881)

* Improe some slow tests

* lint

* lint

* goddamn imports

* [query] Remove dead code in prom package (m3db#2871)

* [dbnode] Refactoring dbShard (m3db#2848)

* [ci] Use gofmt to rename generated identifiers (m3db#2883)

* Order index segments in multi segments builder in descending order. (m3db#2875)

* [all] Return a 504 error if timeout. (m3db#2886)

* [cluster] Store shards in sorted form (m3db#2890)

* [docs] Update buildkite doc path (m3db#2891)

* Add new website relaunch (m3db#2892)

* [docs] Fix operator docs no longer being built and published (m3db#2895)

* [aggregator] Remove msgpack support (m3db#2894)

* [dbnode] Remove dead code in ts package (m3db#2898)

* [aggregator] Reduce delays in integration tests (m3db#2896)

* [query] Query handlers refactoring (m3db#2872)

* Initial commit for proposed query handlers refactoring:
 * updated CustomHandler interface
 * unified how query routes are added. no need to pass router around and wrapping is done in one place.
 * routes are registered with names so they could be easily found later when custom handlers are registered.

* trying to make linter happy

* linter fixes

* revert old behaviour

* Make sure route methods are taken into account when adding and searching for named route.

* fixed code formatting

* [dbnode] Refactor wide query path (m3db#2826)

* [dbnode] Introduce Aggregator type (m3db#2840)

* [coordinator] Set default namespace tag to avoid colliding with commonly used "namespace" label (m3db#2878)

* [coordinator] Set default namespace tag to avoid colliding with common "namespace" default value

* Use defined constant

* Add downsampler test case to demonstrate override namespace tag

Co-authored-by: Wesley Kim <[email protected]>

* Improve some slow tests (m3db#2881)

* Improe some slow tests

* lint

* lint

* goddamn imports

* Changes after code review.

* [query] Remove dead code in prom package (m3db#2871)

* Register separate route for each method.

* linter fixes

* removed code duplication in hasndler_test

* Fail if route was already registered.

* formatted code

* Update src/query/api/v1/httpd/handler_test.go

Co-authored-by: Vilius Pranckaitis <[email protected]>

* Update src/query/api/v1/httpd/handler_test.go

Co-authored-by: Vilius Pranckaitis <[email protected]>

* More handler tests.

Co-authored-by: arnikola <[email protected]>
Co-authored-by: Linas Medžiūnas <[email protected]>
Co-authored-by: Rob Skillington <[email protected]>
Co-authored-by: Wesley Kim <[email protected]>
Co-authored-by: Vytenis Darulis <[email protected]>
Co-authored-by: Vilius Pranckaitis <[email protected]>

* [docs] Add missing single quote to shell command (m3db#2893)

* [docs] Update theme rebased (m3db#2899)

* Update README to temporarily remove the logo (m3db#2902)

* [docs] Small changes to website/docs (m3db#2900)

* [changelog] v1.0.0 changelog update (m3db#2904)

* [DOCS] Fix broken images and add formatting to links (m3db#2903)

* [DOCS] Correct grammar issue on home page (m3db#2905)

* Fix seedNodes config in local stack yaml (m3db#2907)

* [dtest] Fix API incompatibilities in docker harness (m3db#2849)

* Correct old typo (m3db#2906)

* [dtest] API tests for /query and /query_range endpoints (m3db#2873)

* [dbnode] Query logging (m3db#2888)

* [query] Add lookback duration from query config (m3db#2913)

* [query] Fix invalid query resulting in 500 (m3db#2910)

* [query] Fix /m3query returning 500 on invalid query argument (m3db#2916)

* [linter] more optimal linter invocation for "all" case (m3db#2863)

* [dbnode] Remove dead code in encoding package (m3db#2920)

* [dbnode] Fix client config respecting value for connect consistency (m3db#2914)

* [storage] Add Aliyun storage class (m3db#2908)

* Update ci submodule to latest (m3db#2921)

This was accidentally reverted to an earlier commit in
https://github.com/m3db/m3/pull/2907/files.

* [m3cluster/etcd] Use zap logger for etcd integration test store (m3db#2915)

* [docs] Parameterize menus (m3db#2918)

* [coordinator] Validate placement on set placement endpoint unless force set (m3db#2922)

* Update development guide (m3db#2832)

* [dbnode] Properly rebuild index segments if they fail verification. (m3db#2879)

* [dbnode] Add configurability for regexp DFA and FSA limits (m3db#2926)

* [DOCS] Separate config to allow for dev and prod setups (m3db#2909)

* [aggregator] Use NaN instead of math.MaxFloat64 and add sentinel guards (m3db#2929)

* [aggregator] Return NaN instead of 0 for NaN gauge values (m3db#2930)

* [query] Allow Graphite variadic functions to omit variadic args (m3db#2882)

* [query] Graphite query timeout propagation and add per endpoint status/latency metrics (m3db#2880)

* [query] Fix incorrect content type in m3query/ error response (m3db#2917)

* [dbnode] Remove dead code in fs package (m3db#2932)

* [dbnode] Add DocRef() to NS and multiple series metadata types  (m3db#2931)

* Revert "[dbnode] Properly rebuild index segments if they fail verification. (m3db#2879)" (m3db#2944)

This reverts commit c6fe28d.

* [aggregator/client] Include instance ID in write errors (m3db#2945)

* [dbnode] Update series metadata type name. (m3db#2946)

* [dbnode] Remove some dead code from peersSource (m3db#2779)

* Prom read instant handler refactoring (m3db#2928)

* [query] Allow customizing request parsing for /query handler

* fix lint errors

* fix another lint error

* PR comments

* add an interface for hooks

* Removed read instant handler.

* Added some comments.

* Uses functional options pattern.

* Added comments for exported functions.

* Simplified options.

* Got rid of 2 fields in readHandler.

Co-authored-by: Vilius Pranckaitis <[email protected]>
Co-authored-by: Rob Skillington <[email protected]>

* [coordinator] Extract new namespace validation logics (m3db#2919)

* [linter] Fix linter not finding any issues (m3db#2948)

* [dbnode] Add shard to ID batch (m3db#2764)

* [dbnode] Integrate ns cold flusher into tile aggregation. (m3db#2923)

* [tests] Use prometheus v2.22 docker image in docker-integration-tests (m3db#2951)

* [dbnode] Widen exposure of namespace method (m3db#2952)

* [dtest] Allow skipping docker image build by providing existing image (m3db#2942)

* [tests] Fix deprecated Prometheus metric in docker-integration-tests (m3db#2953)

* [lint] Update instances of Reuseable -> Reusable (m3db#2950)

* [integration] Expose TestIndexWrite methods (m3db#2956)

* [docs] Add diagram to comparator readme (m3db#2288)

* [coordinator] Consider uninitialized case for UnaggregatedClusterNamespace with dynamic clusters (m3db#2957)

* [coordinator] Consider uninitialized case for UnaggregatedClusterNamespace with dynamic clusters

* Fixup ready_test

* Apply suggestions from code review

Co-authored-by: arnikola <[email protected]>

* PR feedback

* Revert go mod changes

Co-authored-by: arnikola <[email protected]>

* [dbnode] Simplified interface for MatchesSeriesIters (m3db#2954)

* [dbnode] Add wide filter (m3db#2949)

* [dbnode] Fix integration code under race with TChannel channel options mutation issue (m3db#2958)

* [dbnode] Additional params for Aggregator (m3db#2959)

* [cluster] Expose underlying staged placement version in ActiveStagedPlacement (m3db#2963)

* [DOCS] Add versions to docs config (m3db#2935)

* Add versions to docs config

Signed-off-by: ChrisChinchilla <[email protected]>

* Update Victor theme

Signed-off-by: ChrisChinchilla <[email protected]>

* [DOCS] SEO fixes (m3db#2937)

* Change site title

Signed-off-by: ChrisChinchilla <[email protected]>

* Remove duplicated file

Signed-off-by: ChrisChinchilla <[email protected]>

* Reorder config items

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix menus, title and relevant config

Signed-off-by: ChrisChinchilla <[email protected]>

* Update Victor theme

Signed-off-by: ChrisChinchilla <[email protected]>

* Change path configuration

Signed-off-by: ChrisChinchilla <[email protected]>

* Change title back to param

Signed-off-by: ChrisChinchilla <[email protected]>

* [docs] Update docs to clarify Flush and Buffer in Storage Engine (m3db#2511)

* * Expand a bit about the type of flushes and how buffer is structured due to accommodate the two types of writes
* Emphasis few terms that were hard to read at first time
* Fixes several typos and punctuation.

* Change links

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix links

Signed-off-by: ChrisChinchilla <[email protected]>

* Apply formatting

Signed-off-by: ChrisChinchilla <[email protected]>

Co-authored-by: Chris Chinchilla <[email protected]>

* [aggregator] Split up TCP and M3Msg clients (m3db#2964)

* [aggregator] Add ActivePlacement method to TCP client (m3db#2971)

* [watchmanager] Do not leak tickers in stopped watches (m3db#2972)

* [etcd] Clean up logging in WatchManager (m3db#2973)

* [etcd] Log watch error source details (m3db#2974)

* [etcd] Expose cached etcd clients in cluster etcd config service (m3db#2975)

* [dbnode] Prevent potential division by 0 in StreamingWriter (m3db#2965)

* [dbnode] Fix shard time ranges superset logic. Cleanup and add tests. (m3db#2968)

* [docs] Fix link for July 2020 community meeting recording (m3db#2978)

* [query] Fix query metrics assigning wrong status codes for errors (m3db#2960)

* [cluster] Fix deadlock in new ActiveStagedPlacement method (m3db#2980)

* [coordinator] add graphite names to aggregation types (m3db#2970)

* Fix broken og meta tags on static pages (m3db#2982)

Signed-off-by: ChrisChinchilla <[email protected]>

* [docs] Remove reference to adding namespace to coordinator config (m3db#2977)

Co-authored-by: Chris Chinchilla <[email protected]>

* [coordinator] [query] Add readiness probe for probing current consistency level achievability (m3db#2976)

* [cluster] Fix watch resource leak/hang (m3db#2984)

* Remove odd uses of satori/go.uuid package (m3db#2985)

* [tools] Add benchmarking support to read_data_files (m3db#2986)

* [dbnode] Implement shard.ScanData (m3db#2981)

* [dbnode] Add TChannel channel configuration (m3db#2989)

* [aggregator] Fix panic on shutdown in ForwardedWriter (m3db#2987)

* [DOCS] Fix grammar and create code snippet for step in quickstart (m3db#2961)

* Fix grammar and create code snippet for step in quickstart

Signed-off-by: ChrisChinchilla <[email protected]>

* Update other files with readiness

Signed-off-by: ChrisChinchilla <[email protected]>

* [aggregator] Use a single goroutine to emit metrics for all TCP client queues (m3db#2991)

* [aggregator] Lockless ratelimiter (m3db#2988)

* [x/net/http] Add Proxy field to HTTPClientOptions (m3db#2994)

* [dbnode] Skip out of retention index segments during bootstrap. (m3db#2992)

* [aggregator] keep metric type during the aggregation (m3db#2941)

* Update k8s doc references (m3db#2998)

* [m3coordinator] Allow downsampler to configure custom rule store (m3db#2996)

* [rules] Set tags field of mapping rules history conversion (m3db#2999)

* [query] Fix for panic when deleting a namespace (m3db#2990)

* [coordinator] Update ApplyCustomRuleStore interface (m3db#3000)

* [cluster] Close etcd watches completely before recreating (m3db#2997)

* [coordinator] Add WriteNamespaces API to rules store (m3db#3001)

* [dbnode] Add ability to force enable cold writes from config (m3db#3002)

* Adding Hostinger Logo (m3db#3006)

* [DOCS] Add clustering getting started guides for binaries and kubernetes (m3db#2795)

* Move other quickstarts

Signed-off-by: ChrisChinchilla <[email protected]>

Move configuration from common steps as it no longer matches k8s steps

Signed-off-by: ChrisChinchilla <[email protected]>

Squashed commit of the following:

commit cfffc26414de48e6e5d4784f0908aaebb19743fe
Author: ChrisChinchilla <[email protected]>
Date:   Mon Oct 26 15:57:52 2020 +0100

    wip

    Signed-off-by: ChrisChinchilla <[email protected]>

commit e8b9766
Author: ChrisChinchilla <[email protected]>
Date:   Mon Oct 26 15:53:36 2020 +0100

    Move previous guides to clustering quickstart section

    Signed-off-by: ChrisChinchilla <[email protected]>

Signed-off-by: ChrisChinchilla <[email protected]>

Update section

Signed-off-by: ChrisChinchilla <[email protected]>

Fix links

Signed-off-by: ChrisChinchilla <[email protected]>

Fix links add redirects

Signed-off-by: ChrisChinchilla <[email protected]>

Remove aggregator mention

Signed-off-by: ChrisChinchilla <[email protected]>

Remove aggregator mention

Signed-off-by: ChrisChinchilla <[email protected]>

Refactor

Signed-off-by: ChrisChinchilla <[email protected]>

Remove Docker fo rnow

Signed-off-by: ChrisChinchilla <[email protected]>

Remove and correct broken links

Signed-off-by: ChrisChinchilla <[email protected]>

Revert "Remove Docker fo rnow"

This reverts commit 7b56da1.

Fix more broken links

Signed-off-by: ChrisChinchilla <[email protected]>

Draft docker guide

Signed-off-by: ChrisChinchilla <[email protected]>

Remove duplicate content

Signed-off-by: ChrisChinchilla <[email protected]>

Remove embedded cluster note

Signed-off-by: ChrisChinchilla <[email protected]>

Move other quickstarts

Signed-off-by: ChrisChinchilla <[email protected]>

Squashed commit of the following:

commit cfffc26414de48e6e5d4784f0908aaebb19743fe
Author: ChrisChinchilla <[email protected]>
Date:   Mon Oct 26 15:57:52 2020 +0100

    wip

    Signed-off-by: ChrisChinchilla <[email protected]>

commit e8b9766
Author: ChrisChinchilla <[email protected]>
Date:   Mon Oct 26 15:53:36 2020 +0100

    Move previous guides to clustering quickstart section

    Signed-off-by: ChrisChinchilla <[email protected]>

Signed-off-by: ChrisChinchilla <[email protected]>

Update section

Signed-off-by: ChrisChinchilla <[email protected]>

Fix links

Signed-off-by: ChrisChinchilla <[email protected]>

Fix links add redirects

Signed-off-by: ChrisChinchilla <[email protected]>

Remove aggregator mention

Signed-off-by: ChrisChinchilla <[email protected]>

Remove aggregator mention

Signed-off-by: ChrisChinchilla <[email protected]>

Refactor

Signed-off-by: ChrisChinchilla <[email protected]>

Remove and correct broken links

Signed-off-by: ChrisChinchilla <[email protected]>

Respond to feedback

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix rendering issues

Signed-off-by: ChrisChinchilla <[email protected]>

* Update theme

Signed-off-by: ChrisChinchilla <[email protected]>

* Remove failing git info flag

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix links

Signed-off-by: ChrisChinchilla <[email protected]>

* Respond to feedback

Signed-off-by: ChrisChinchilla <[email protected]>

* Respond to feedback and fix rebased files

Signed-off-by: ChrisChinchilla <[email protected]>

* Remove helm mentions

Signed-off-by: ChrisChinchilla <[email protected]>

* Respond to feedback

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix link

Signed-off-by: ChrisChinchilla <[email protected]>

* Update theme to version 0.2.2

Signed-off-by: ChrisChinchilla <[email protected]>

* Tidy Go mods

Signed-off-by: ChrisChinchilla <[email protected]>

* Quick fix to broken code tabs on quickstart (m3db#3010)

Signed-off-by: ChrisChinchilla <[email protected]>

* [cluster] Watch follow-ups (m3db#3007)

* [coordinator] Allow clients to pass in augmentM3Tags as a config (m3db#3014)

AugmentM3Tags will augment the metric type to aggregated metrics
to be used within the filter for rules. If enabled, for example,
your filter can specify '__m3_type__:gauge' to filter by gauges.
This is particularly useful for Graphite metrics today.
Furthermore, the option is automatically enabled if static rules are
used and any filter contain an __m3_type__ tag.

* [docs] Fix conflicting OpenAPI operation IDs (m3db#3009)

* [coordinator] Include tags in view.MappingRule Equals (m3db#3015)

* [dbnode] Emit consistencyResultError from fetchTaggedResultAccumulator (m3db#3016)

* [dbnode] Introduce Resource Exhausted RPC Error flag for query limits (m3db#3017)

* [DOCS] Fix new API paths and add Docker version (m3db#3018)

* Fix new API paths and add Docker version

Signed-off-by: ChrisChinchilla <[email protected]>

* Force add missing shortcode

Signed-off-by: ChrisChinchilla <[email protected]>

* [dbnode] Add server.StorageOptions to TestSetup (m3db#3023)

* [dbnode] Fix "unable to satisfy consistency requirements" error message (m3db#3025)

* [coordinator] Pass along instrument options into custom rule store fn (m3db#3027)

* [DOCS] Fix services ready path (m3db#3026)

* Fix services ready path

Signed-off-by: ChrisChinchilla <[email protected]>

* Update theme

Signed-off-by: ChrisChinchilla <[email protected]>

* [query] Add missing "status" field to PromQL error responses (m3db#2933)

* [dbnode] Add a few tests for query limit exceeded error (m3db#3030)

* [cluster] Add config wiring for etcd timeouts, retries, serialized gets (m3db#3035)

* [aggregator] Pack some tcp client structs for lower memory utilization (m3db#3037)

* [coordinator] Remove unused DisableAutoMappingRules config (m3db#3036)

* [query] Allow injecting function for rewriting error response (m3db#3008)

* [DOCS] SEO and config changes (m3db#3024)

* Add GitHub edit URL

Signed-off-by: ChrisChinchilla <[email protected]>

* Add robots generation

Signed-off-by: ChrisChinchilla <[email protected]>

* Update redirects

Signed-off-by: ChrisChinchilla <[email protected]>

* Add 404 page

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix paths

Signed-off-by: ChrisChinchilla <[email protected]>

* Fi title and description

Signed-off-by: ChrisChinchilla <[email protected]>

* Update theme

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix random titles

Signed-off-by: ChrisChinchilla <[email protected]>

* [DOCS] Add back FAQ and troubleshooting sections (m3db#3029)

* FAQ and troubleshooting sections

Signed-off-by: ChrisChinchilla <[email protected]>

* Fix links

Signed-off-by: ChrisChinchilla <[email protected]>

* [dbnode] Client borrow connection API (m3db#3019)

* [dbnode] Support checkpointing in cold flusher and preparing index writer per block (m3db#3040)

* [coordinator] Ignore rollup rule storage policies when deciding to utilize auto-mapping rules (m3db#3044)

* [coordinator] Ignore rollup rule storage policies when deciding to utiilize auto-mapping rules

* IsRollupRule -> IsMappingRule

* [aggregator] Fix panic on invalid unaggregated payloads (m3db#3041)

* [coordinator] Add Carbon ingest latency metrics (m3db#3045)

* [query] Graphite match regexp all values for __g0__ tag matcher instead of match field (m3db#3021)

* [query] Update Graphite quoted strings to just escape quotes and a flag for previous escape behavior (m3db#3022)

* [coordinator] Add Graphite Carbon ingest contains rule matcher for fast match (m3db#3046)

* [coordinator] Add Graphite rewrite cleanup directive for cleansing incoming metrics (m3db#3047)

* [coordinator] Add Graphite Carbon rewrite cleanup integration test (m3db#3049)

* [query] implemented Graphite's `powSeries` function (m3db#3038)

* [tools] Fix failing linter (m3db#3052)

* [query] Add Graphite support for ** with metric path selectors (m3db#3020)

* [aggregator/client] Metric for dropped metrics (m3db#3054)

Problem:
When collector fails to write a metric to aggregator, it logs an error but in practice it is almost impossible to tell whether it failed to write to both peers owning a shard or only one of them, i.e. whether data is lost or not.

Solultion:
Emit a metric indicating data loss.

* [r2ctl] Bump urijs from 1.19.1 to 1.19.5 in /src/ctl/ui (m3db#3055)

Bumps [urijs](https://github.com/medialize/URI.js) from 1.19.1 to 1.19.5.
- [Release notes](https://github.com/medialize/URI.js/releases)
- [Changelog](https://github.com/medialize/URI.js/blob/gh-pages/CHANGELOG.md)
- [Commits](medialize/URI.js@v1.19.1...v1.19.5)

Signed-off-by: dependabot[bot] <[email protected]>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* [coordinator] Add ability to turn off rule matching cache (m3db#3059)

* Don't attempt to lint genny gen'd code (m3db#3063)

* [dbnode][m3ninx] Rename doc.Document -> doc.Metadata (m3db#3062)

* [dtest] Upgrade dockertest to v3.6.3 (m3db#3053)

* [dbnode] Add ExcludeOrigin to skip localhost on BorrowConnections (m3db#3066)

* [dtest] Add a method for Prom remote writes (m3db#3065)

* [dbnode][m3ninx] Add support for reading document containers from an index (m3db#3050)

Reading raw document metadata from an index can end up
being rather expensive for metadata with a lot of tags.
This commit introduces the concept of encoded metadata,
which wrap the relevant section of bytes and provides
an efficient reader to retrieve the non-encoded metadata
without ballooning memory usage. Additionally, introduce a
concept of a document that wraps either raw metadata
or encoded metadata, which can be used regardless of
whether an index segment is backed by metadata (from memory)
or encoded metadata (read from disk)

* [query] Fix aggregated namespace header to be bad request instead of internal server error (m3db#3070)

* [coordinator] Add TagFilter Matches comments (m3db#3072)

* [coordinator] Remove includeRollupsOnDefaultRuleFiltering flag (m3db#3073)

Confirmed this is working as expected, and is not
useful to configure otherwise.

Co-authored-by: Rob Skillington <[email protected]>

* [dbnode] Remove per-series traces on read queries (m3db#3074)

* [x] Replace InnerError() method usages with xerrors.InnerError() (m3db#3068)

* [aggregator] Add ActivePlacementVersion to tcp client (m3db#3071)

* [coordinator] Rollout augmentM3Tags flag to true by default (m3db#3082)

* [coordinator] Rollout augmentM3Tags flag to true by default

* Fixup operator docs link

* Fixup doc site links

* [matcher/coordinator] Add latency metrics to rule matching (m3db#3083)

* [dbnode][m3ninx] Use new doc.Document in query results to reduce slice allocations (m3db#3057)

* [coordinator] Disable downsampler matcher cache by default (m3db#3080)

* [dtest] Run tests on an existing cluster launched with docker compose (m3db#3067)

* Additional metrics for peers bootstrapper (m3db#3060)

* refactored instrumentation code for peers bootstrapper.
added additional timers for peers bootstrapper to track individual steps.

* fixed linter warnings

* removed dead code

* removed dead code

* changes after review

* added new gauge - bootstrap-retries

* moved some instrumentation methods to instrumentationContexts for better encapsulation and easier usage.

* forgot to set nowFn

* added methods for creating instrumentation contexts.

* changes after code review

* [dbnode] Log namespace and shard upon invalid series read/write count (m3db#3092)

* [dbnode] Fix node serving reads/marked bootstrapped after bootstrap failure (m3db#3088)

* set bootstrap state to Bootstrapped when it returns no errors

* added bootstrap regression test.

* removed new test and updated old test to check for bootstrap states.

* [cluster] Fix flaky watchmanager tests (m3db#3091)

* [dbnode] Remove allocation per series ID when streaming block from disk (m3db#3093)

* [dbnode] Remove reverse index sharing leftovers (m3db#3095)

* Limit for time series read from disk (m3db#3094)

* Limit for time series read from disk

There is additional memory costs when time series need to be loaded from
disk (in addition to the actual bytes being read). This new limit allows
docLimits to be higher so series already in memory can easily be served
without hitting limits.

* [x] Make serialize.TagValueFromEncodedTagsFast() faster (m3db#3097)

* Revert "[aggregator] keep metric type during the aggregation" (m3db#3099)

* [m3db] Check bloom filter before stream request allocation (m3db#3103)

* [m3db] Check bloom filter before stream request allocation

* Add test assertions for bloom filer misses metric

* Remove redundant series-read metric

* Capture seekerMgr instead Rlock (m3db#3104)

seekerMgr could change outside the lock, which might result in a nil
pointer

* Replace bytes.Compare() == 0 with bytes.Equal() (m3db#3101)

* [dbnode] Faster search of tag bytes in convert.FromSeriesIDAndTags (m3db#3075)

* [tests] Skip flaky TestWatchNoLeader (m3db#3106)

* [dbnode] Direct conversion of encoded tags to doc.Metadata (m3db#3087)

* [query] Implemented Graphite's pow function (m3db#3048)

* [tests] test setups exported to allow us to use it from other packages (m3db#3042)

* Disable downsample in case of agg namespace

Check if there's at least one aggregated namespace with downsample disabled. If so, disabled the downsample object entirely

* minor

Co-authored-by: arnikola <[email protected]>
Co-authored-by: Linas Medžiūnas <[email protected]>
Co-authored-by: Vytenis Darulis <[email protected]>
Co-authored-by: Vilius Pranckaitis <[email protected]>
Co-authored-by: Bo Du <[email protected]>
Co-authored-by: Chris Chinchilla <[email protected]>
Co-authored-by: Rob Skillington <[email protected]>
Co-authored-by: λinas <[email protected]>
Co-authored-by: Wesley Kim <[email protected]>
Co-authored-by: nate <[email protected]>
Co-authored-by: Benjamin Raskin <[email protected]>
Co-authored-by: Ryan Allen <[email protected]>
Co-authored-by: Ryan Hall <[email protected]>
Co-authored-by: Antanas Bastys <[email protected]>
Co-authored-by: 李国忠 <[email protected]>
Co-authored-by: Matt Way <[email protected]>
Co-authored-by: Alex Bublichenko <[email protected]>
Co-authored-by: Asaf Mesika <[email protected]>
Co-authored-by: shreyassrivatsan <[email protected]>
Co-authored-by: Jerome Froelich <[email protected]>
Co-authored-by: Gediminas Guoba <[email protected]>
Co-authored-by: Gibbs Cullen <[email protected]>
Co-authored-by: Dean Wahle <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: omarkhalid79 <[email protected]>
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