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

client: AppendService owns its buffer sync.Pool #299

Merged
merged 1 commit into from
Sep 15, 2021

Conversation

jgraettinger
Copy link
Contributor

@jgraettinger jgraettinger commented Sep 15, 2021

Rather than using a global singleton Pool.

In the future this may allow for better coupling of resource quotas
and back-pressure against specific AppendService instances,
correlated to different consumer.Shards.

The immediate motivation is fixing a test-only bug, where a
mockFile{} fixture is added to the global Pool and causes a
future test case to fail.

Issue #297


This change is Reviewable

Rather than using a global singleton Pool.

In the future this may allow for better coupling of resource quotas
and back-pressure against specific AppendService instances,
correlated to different consumer.Shards.

The immediate motivation is fixing a test-only bug, where a
mockFile{} fixture is added to the global Pool and causes a
future test case to fail.

Issue #297
Copy link
Contributor

@psFried psFried left a comment

Choose a reason for hiding this comment

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

Looks good to me. One thought that occurs is that the lifecycle of each pool is now potentially a lot shorter. Is there anything we should be doing to cleanup the pools when an append service is shutdown, or is it ok to let it be handled by the garbage collector?

@jgraettinger
Copy link
Contributor Author

A-ok for the garbage collector to deal with them. Thanks

@jgraettinger jgraettinger merged commit 92f8116 into master Sep 15, 2021
@jgraettinger jgraettinger deleted the johnny/own-buffer branch September 15, 2021 14:13
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