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

Added facility for tracking and exposing basic database-level stats #58

Merged
merged 2 commits into from
Jun 7, 2018

Conversation

oxtoacart
Copy link
Contributor

Part 1 of #12.

@oxtoacart oxtoacart requested a review from forkner June 4, 2018 19:44
func QueuedForFollower(followerID int, queued int) {
mx.Lock()
defer mx.Unlock()
followerStats[followerID].Queued = queued
Copy link

@forkner forkner Jun 7, 2018

Choose a reason for hiding this comment

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

It looks okay by eyeball -- but could followerStats[followerID] be nil here if it was in a race for the lock with FollowerFailed and FollowerFailed wins?

It looks like markFailed can only be triggered from a read that starts strictly after processing that follower, but it's a bit subtle, so just wanted to check if that was the expectation.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is the expectation. Great question!

@forkner
Copy link

forkner commented Jun 7, 2018

@oxtoacart looks okay to me, not sure how to interpret the CI results. master also seems to be having issues.

@oxtoacart
Copy link
Contributor Author

Thanks @forkner!

@oxtoacart oxtoacart merged commit ca2f6a8 into master Jun 7, 2018
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.

2 participants