db: add IngestOperationStats for admission control#1653
db: add IngestOperationStats for admission control#1653sumeerbhola merged 1 commit intocockroachdb:masterfrom
Conversation
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @mufeez-amjad and @sumeerbhola)
ingest.go, line 588 at r1 (raw file):
// into L0. // Currently, this value is completely accurate, but we are allowing this to // be approximate once https://github.com/cockroachdb/pebble/issues/25 is
I'll need to think about how to approximate this when we don't know ahead of time what level an SST will be ingested to.
mufeez-amjad
left a comment
There was a problem hiding this comment.
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @mufeez-amjad and @sumeerbhola)
ingest.go, line 588 at r1 (raw file):
Previously, mufeez-amjad (Mufeez Amjad) wrote…
I'll need to think about how to approximate this when we don't know ahead of time what level an SST will be ingested to.
Saw your comment in the issue, was thinking that would be enough.
sumeerbhola
left a comment
There was a problem hiding this comment.
TFTR!
Reviewable status: 0 of 3 files reviewed, 1 unresolved discussion (waiting on @mufeez-amjad)
ingest.go, line 588 at r1 (raw file):
Previously, mufeez-amjad (Mufeez Amjad) wrote…
Saw your comment in the issue, was thinking that would be enough.
Ack
To allow for async ingestion (being implemented) we don't reuse TableIngestInfo, and allow an approximate value for the bytes ingested into L0. These will be used in admission control to more precisely account for how much load an operation is adding to L0 (prototype is in https://github.com/cockroachdb/cockroach/blob/ec4149e310f9b383f87cc7ff8776258d72927394/pkg/util/admission/work_queue.go#L911). Fixes cockroachdb#1600
fc9624b to
18ad83e
Compare
To allow for async ingestion (being implemented) we don't reuse
TableIngestInfo, and allow an approximate value for the bytes
ingested into L0. These will be used in admission control to
more precisely account for how much load an operation is adding
to L0 (prototype is in
https://github.com/cockroachdb/cockroach/blob/ec4149e310f9b383f87cc7ff8776258d72927394/pkg/util/admission/work_queue.go#L911).
Fixes #1600