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: produce the FlushEnd event after installing readState #1540

Merged
merged 1 commit into from
Feb 27, 2022

Conversation

sumeerbhola
Copy link
Collaborator

This helps unit tests that use the callback to trigger a
read using an iterator with IterOptions.OnlyReadGuaranteedDurable.

Informs cockroachdb/cockroach#77046

@sumeerbhola sumeerbhola requested a review from a team February 26, 2022 00:52
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Contributor

@nicktrav nicktrav 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 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @sumeerbhola)


compaction.go, line 1454 at r1 (raw file):

	d.mu.versions.incrementCompactionBytes(-c.bytesWritten)

	info.TotalDuration = d.timeNow().Sub(startTime)

I take it we don't want to include the time it takes to update the read state and table stats?

@sumeerbhola
Copy link
Collaborator Author

TFTR!

This helps unit tests that use the callback to trigger a
read using an iterator with IterOptions.OnlyReadGuaranteedDurable.

Informs cockroachdb/cockroach#77046
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.

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @nicktrav)


compaction.go, line 1454 at r1 (raw file):

Previously, nicktrav (Nick Travers) wrote…

I take it we don't want to include the time it takes to update the read state and table stats?

what I did was not principled, even though this part should be cheap (unlike creating a new Version) -- fixed now.

@sumeerbhola sumeerbhola merged commit 40d39da into cockroachdb:master Feb 27, 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.

3 participants