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

Seastar changes for abort on OOM #39

Merged
merged 5 commits into from
Feb 23, 2023

Conversation

travisdowns
Copy link
Member

@travisdowns travisdowns commented Feb 16, 2023

We are moving to enable abort-on-OOM by default, and as part of this it is useful to be able to disable as well as enable this setting (current behavior is that it starts out disabled and the reactor does a one-time enable based on the command line flag --abort-on-seastar-bad-alloc.

This series implements the ability to disable it and also to get its status.

A small test is included.

There is a parallel PR for this same series on the scylladb side here:

scylladb#1506

So we should give that a bit of time to see if there are changes there and realign in order to avoid merging issues later.

There is a global "abort on OOM" setting in the seastar, and
we allow enabling it via a public method in seastar::memory.

There was no corresponding method to disable it, but such
a method is useful in order to give applications full control
over this setting.

Introduce a new method which takes a boolean parameter in order to allow
both enabling and disabling the abort behavior. The old call is
deprecated and simply falls the new method with enabled=true.
Add an is_abort_on_allocation_failure method which returns
the global state of this reactor option.

This is useful for applications that which to query this state in order
to expose it for debugging or administration purposes. Applications
could try to track this themselves, but this is unreliable since the
reactor itself can change this value based on the command line flags.
A basic test which flips the abort on OOM switch up and
down and which checks that the is_enabled function
returns the correct value.
Replace enable_abort_on_allocation_failure with
set_abort_on_allocation_failure(true) as the former is deprecated.
To include details of the set_abort_on_allocation_failure API.
@travisdowns
Copy link
Member Author

The upstream change is taking a while, but it seems like this is the version that will be accepted by upstream, so I think we can review & merge this even before upstream.

See here for the upstream review:

scylladb#1506

@dotnwat dotnwat merged commit 5cfecb4 into redpanda-data:v23.1.x Feb 23, 2023
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