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: flesh out CompactionInfo.Reason #1147

Merged
merged 1 commit into from
May 15, 2021

Conversation

petermattis
Copy link
Collaborator

Fill in CompactionInfo.Reason with the kind of compaction: default,
move, delete-only, elision-only, or read.

Fixes #1142

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@petermattis
Copy link
Collaborator Author

We don't have good test coverage of this, but I did run pebble bench ycsb -v --workload=C ... and verified that we're seeing compacting(default), compacting(move), and compacting(read).

Copy link
Collaborator

@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.

:lgtm:

Reviewed 5 of 5 files at r1.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @petermattis)


metrics.go, line 129 at r1 (raw file):

	Compact struct {
		// The total number of compactions, and per-compaction type counts.

why does this say "per-compaction type counts" -- we don't seem to have that.

Copy link
Collaborator Author

@petermattis petermattis 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: 4 of 5 files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)


metrics.go, line 129 at r1 (raw file):

Previously, sumeerbhola wrote…

why does this say "per-compaction type counts" -- we don't seem to have that.

Oops. I started down the path of implementing #1145, then reversed course. This was a left-over from the detour.

Fill in `CompactionInfo.Reason` with the kind of compaction: default,
move, delete-only, elision-only, or read.

Fixes cockroachdb#1142
@petermattis
Copy link
Collaborator Author

TFTR!

@petermattis petermattis merged commit 39fe91d into cockroachdb:master May 15, 2021
@petermattis petermattis deleted the pmattis/compact-events branch May 15, 2021 13:26
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: enhance CompactionInfo.Reason
3 participants