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

support jackson buffer recycler #519

Merged
merged 4 commits into from
Mar 27, 2024
Merged

Conversation

pjfanning
Copy link
Contributor

@pjfanning pjfanning commented Mar 16, 2024

@pjfanning pjfanning marked this pull request as ready for review March 27, 2024 14:30
@pjfanning pjfanning changed the title [WIP] support jackson buffer recycler support jackson buffer recycler Mar 27, 2024
Copy link
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks

.build();
return new JsonMapper(jsonFactory);
}

private static RecyclerPool<BufferRecycler> getBufferRecyclerPool(final Config cfg) {
switch (cfg.getString("buffer-recycler.pool-instance")) {
Copy link
Member

Choose a reason for hiding this comment

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

As it's been used in the exceptions, how about extract to a local val?

Copy link
Member

Choose a reason for hiding this comment

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

And maybe we can assert it should be null too.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is defaulted in reference.conf - virtually every config would blow up if we didn't have defaults - nowhere do we need to check for them not being set - because we have defaults in reference.conf

Copy link
Member

@He-Pin He-Pin left a comment

Choose a reason for hiding this comment

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

Lgtm

@pjfanning pjfanning merged commit 8eb3a50 into apache:main Mar 27, 2024
10 checks passed
@pjfanning pjfanning deleted the jackson-recycler branch March 27, 2024 19:14
@pjfanning pjfanning added this to the 1.1.0-M1 milestone May 22, 2024
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.

None yet

2 participants