Skip to content

db: add IngestOperationStats for admission control#1653

Merged
sumeerbhola merged 1 commit intocockroachdb:masterfrom
sumeerbhola:ingest_stats
Apr 19, 2022
Merged

db: add IngestOperationStats for admission control#1653
sumeerbhola merged 1 commit intocockroachdb:masterfrom
sumeerbhola:ingest_stats

Conversation

@sumeerbhola
Copy link
Copy Markdown
Collaborator

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

@sumeerbhola sumeerbhola requested a review from a team April 15, 2022 19:41
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Contributor

@mufeez-amjad mufeez-amjad left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@mufeez-amjad mufeez-amjad left a comment

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Collaborator Author

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

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
@sumeerbhola sumeerbhola merged commit 4a0889f into cockroachdb:master Apr 19, 2022
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.

db: make DB.Ingest return bytes ingested into L0

3 participants