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

Issue 4126: Fix a slow gc thread shutdown when compacting #4127

Merged
merged 1 commit into from
Dec 4, 2023

Conversation

erobot
Copy link
Contributor

@erobot erobot commented Nov 9, 2023

Descriptions of the changes in this PR:

Motivation

Fix a slow gc thread shutdown when compacting.

The problem here is that the stop flag running has been moved after compacting.compareAndSet. When running is not set to false, entry log continues to compact one after one and the shutdown thread is hard to set the compacting.

Changes

Set running to false first and then check compacting.

Master Issue: #4126

Copy link
Member

@horizonzy horizonzy left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

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

Good Catch!

@hangc0276 hangc0276 merged commit a842f3e into apache:master Dec 4, 2023
16 checks passed
zymap pushed a commit that referenced this pull request Dec 7, 2023
Descriptions of the changes in this PR:

### Motivation

Fix a slow gc thread shutdown when compacting.

The problem here is that the stop flag `running` has been moved after `compacting.compareAndSet`. When `running` is not set to false, entry log continues to compact one after one and the shutdown thread is hard to set the `compacting`.

### Changes

Set `running` to false first and then check `compacting`.

Master Issue: #4126

(cherry picked from commit a842f3e)
yangl pushed a commit to yangl/bookkeeper that referenced this pull request Dec 11, 2023
Descriptions of the changes in this PR:

### Motivation

Fix a slow gc thread shutdown when compacting.

The problem here is that the stop flag `running` has been moved after `compacting.compareAndSet`. When `running` is not set to false, entry log continues to compact one after one and the shutdown thread is hard to set the `compacting`.

### Changes

Set `running` to false first and then check `compacting`.

Master Issue: apache#4126
hangc0276 pushed a commit to hangc0276/bookkeeper that referenced this pull request Jan 18, 2024
Descriptions of the changes in this PR:

### Motivation

Fix a slow gc thread shutdown when compacting.

The problem here is that the stop flag `running` has been moved after `compacting.compareAndSet`. When `running` is not set to false, entry log continues to compact one after one and the shutdown thread is hard to set the `compacting`.

### Changes

Set `running` to false first and then check `compacting`.

Master Issue: apache#4126

(cherry picked from commit a842f3e)
Ghatage pushed a commit to sijie/bookkeeper that referenced this pull request Jul 12, 2024
Descriptions of the changes in this PR:

### Motivation

Fix a slow gc thread shutdown when compacting.

The problem here is that the stop flag `running` has been moved after `compacting.compareAndSet`. When `running` is not set to false, entry log continues to compact one after one and the shutdown thread is hard to set the `compacting`.

### Changes

Set `running` to false first and then check `compacting`.

Master Issue: apache#4126
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants