Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Bigtable idx and store plugins #1082

Merged
merged 44 commits into from
Oct 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fbcaacb
add bigtable IDX and store plugins
Oct 4, 2018
d5a2b60
add docker stack and stacktest for bigtable
Oct 4, 2018
823b58e
gofmt
Oct 4, 2018
5e18cac
remove excessive log prints in unit test
Oct 4, 2018
3f8fd46
fixup docs/config.md
Oct 4, 2018
bd3a20d
go vet fixes
Oct 4, 2018
d6fa7fb
bigtable_idx.enabled should default to false
Oct 5, 2018
9e2282f
fix log message when bigtable backend store init fails.
Oct 8, 2018
e88655d
rename docker stack to docker-dev-bigtable
Oct 10, 2018
e8a2492
improve comments
Oct 12, 2018
aab047b
reset timer before flushing writes.
Oct 12, 2018
834029b
handle errors consistantly in RowToSchema
Oct 12, 2018
4f687db
dont duplicate partition and id in columns
Oct 12, 2018
36610a0
update defaults to more closely match cassandra defaults
Oct 12, 2018
6f7e85e
when scripts/qa/docs.sh fails, explain why
Oct 15, 2018
6d4e0e0
honor read timeout when querying bigtable store
Oct 15, 2018
d76d3df
correctly handle errors when rows cant be marshaled.
Oct 16, 2018
52584d6
clean
Dieterbe Oct 16, 2018
0198f15
bugfix: detect <0 (public) org id's
Dieterbe Oct 16, 2018
b2f1e94
statically type MKey
Dieterbe Oct 16, 2018
98daaaa
direct assign
Dieterbe Oct 16, 2018
88feb07
consistency & diffability
Dieterbe Oct 16, 2018
5f21583
fix configs
Dieterbe Oct 16, 2018
c517da5
more elegant i'm so pedantic i'm sorry
Dieterbe Oct 16, 2018
7d239ca
fix log prefixes
Dieterbe Oct 16, 2018
d981a9f
remove redundant comments
Dieterbe Oct 16, 2018
3a99f45
handle write errors consistently
Oct 17, 2018
5527e59
flush buffer when writeQueue is closed
Oct 17, 2018
9ff218c
standardize config handling
Oct 18, 2018
2a42ac6
handle prune errors consistently in both cassandra and bigtable idx p…
Oct 18, 2018
d94b052
ensure write-max-flush-size is <= 100000
Oct 18, 2018
82209ed
add Limiter to utils package
Oct 18, 2018
4d2927a
typo and diff-ability bigtable & cassandra
Dieterbe Oct 17, 2018
691ec31
don't forget bigtableStore.ConfigProcess()
Dieterbe Oct 19, 2018
e2a670a
various tweaks
Dieterbe Oct 19, 2018
4201a57
Limiter cleanups
Dieterbe Oct 19, 2018
b959792
use AMKey archive details instead of parsing the string
Oct 19, 2018
1dd8d86
use stringified duration for columnFamily name
Oct 19, 2018
6010ff5
fix formatFamily
Oct 19, 2018
5c99c1d
update bigtable metric name and docs/metrics.md
Oct 19, 2018
9889fc7
fix raintank/dur dep constraint
Oct 19, 2018
69fb268
validate max-chunk-span more strictly
Dieterbe Oct 21, 2018
f6bdc15
don't update meter at each operation, we have a monitoring goroutine
Dieterbe Oct 21, 2018
63f6f04
typo's and cleanups
Dieterbe Oct 21, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ jobs:
- run: scripts/qa/docs.sh
- run: docker load -i build_docker/metrictank.tar
- run: go test -v ./stacktest/tests/end2end_carbon
- run: go test -v ./stacktest/tests/end2end_carbon_bigtable

deploy:
docker:
Expand Down
141 changes: 129 additions & 12 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ unused-packages = true

[[constraint]]
name = "github.com/raintank/dur"
branch = "v2"
branch = "master"

[[constraint]]
name = "github.com/raintank/gziper"
Expand Down
23 changes: 5 additions & 18 deletions api/dataprocessor.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,6 @@ func doRecover(errp *error) {
return
}

type limiter chan struct{}

func (l limiter) enter() { l <- struct{}{} }
func (l limiter) leave() { <-l }

func newLimiter(l int) limiter {
return make(chan struct{}, l)
}

type getTargetsResp struct {
series []models.Series
err error
Expand Down Expand Up @@ -253,22 +244,18 @@ func (s *Server) getTargetsLocal(ctx context.Context, reqs []models.Req) ([]mode
responses := make(chan getTargetsResp, len(reqs))

var wg sync.WaitGroup
reqLimiter := newLimiter(getTargetsConcurrency)
reqLimiter := util.NewLimiter(getTargetsConcurrency)

rCtx, cancel := context.WithCancel(ctx)
defer cancel()
LOOP:
for _, req := range reqs {
// check to see if the request has been canceled, if so abort now.
select {
case <-rCtx.Done():
// if there are already getDataConcurrency goroutines running, then block
// until a slot becomes free or our context is canceled.
if !reqLimiter.Acquire(rCtx) {
//request canceled
break LOOP
default:
}
// if there are already getDataConcurrency goroutines running, then block
// until a slot becomes free.
reqLimiter.enter()
wg.Add(1)
go func(req models.Req) {
rCtx, span := tracing.NewSpan(rCtx, s.Tracer, "getTargetsLocal")
Expand All @@ -294,7 +281,7 @@ LOOP:
}
wg.Done()
// pop an item of our limiter so that other requests can be processed.
reqLimiter.leave()
reqLimiter.Release()
span.Finish()
}(req)
}
Expand Down
Loading