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

db: add IngestOperationStats for admission control #1653

Merged
merged 1 commit into from
Apr 19, 2022

Conversation

sumeerbhola
Copy link
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
Member

This change is Reviewable

Copy link
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
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
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