Skip to content

Conversation

hx235
Copy link
Contributor

@hx235 hx235 commented Aug 20, 2025

Context/Summary:
A small change as titled.

Test plan:

  • Existing UT and rehearsal stress test

@meta-cla meta-cla bot added the CLA Signed label Aug 20, 2025
@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this in D80588011.

@hx235 hx235 changed the title [CI only] For test run [CI only] For rehearsal stress test Aug 20, 2025
@hx235 hx235 force-pushed the no_override_non_okay_s_ci branch from a1ef82f to 4b9507e Compare August 20, 2025 02:46
@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this in D80588011.

@hx235 hx235 force-pushed the no_override_non_okay_s_ci branch from 4b9507e to 3fd995a Compare August 28, 2025 00:35
@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this in D80588011.

@hx235 hx235 force-pushed the no_override_non_okay_s_ci branch from 3fd995a to a9a5676 Compare August 28, 2025 23:24
@hx235 hx235 changed the title [CI only] For rehearsal stress test Avoid Resetting Non-Okay Status Due to Shutdown or Manual Compaction Pause Aug 28, 2025
@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this in D80588011.

@hx235 hx235 changed the title Avoid Resetting Non-Okay Status Due to Shutdown or Manual Compaction Pause Avoid Overwritting Non-Okay Status Due to Shutdown or Manual Compaction Pause Aug 28, 2025
@hx235 hx235 changed the title Avoid Overwritting Non-Okay Status Due to Shutdown or Manual Compaction Pause Avoid overwriting non-okay status due to shutdown or manual compaction pause Aug 28, 2025
@hx235 hx235 requested a review from jaykorean August 29, 2025 01:59
@@ -1120,16 +1120,16 @@ void CompactionIterator::NextFromInput() {
}
}

if (!Valid() && IsShuttingDown()) {
if (!Valid() && status_.ok() && IsShuttingDown()) {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: wondering if we can place all three checks under the same status_.ok check and use else if

if (status_.ok()) {
   if (!Valid() && IsShuttingDown()) {
     status_ = Status::ShutdownInProgress();
   } else if (IsPausingManualCompaction()) {
    status_ = Status::Incomplete(Status::SubCode::kManualCompactionPaused);
  } else if (!input_.Valid() && input_.status().IsCorruption()) {
    status_ = input_.status();
  }
}

to avoid two additional status_.ok() checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@@ -1610,11 +1610,10 @@ Status CompactionJob::FinalizeProcessKeyValueStatus(
status =
Status::ColumnFamilyDropped("Column family dropped during compaction");
}
if ((status.ok() || status.IsColumnFamilyDropped()) &&
shutting_down_->load(std::memory_order_relaxed)) {
if (status.ok() && shutting_down_->load(std::memory_order_relaxed)) {
Copy link
Contributor

@jaykorean jaykorean Aug 29, 2025

Choose a reason for hiding this comment

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

Curious why we were overwriting ColumnFamilyDropped() status with IsShutdown or IsPaused status previously.

As opposed to the change above in NextFromInput(), this checks were explicitly checking IsColumnFamilyDropped(), so I'm wondering if there was a reason for this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Probably just an honest inconsistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@facebook-github-bot
Copy link
Contributor

@hx235 has imported this pull request. If you are a Meta employee, you can view this in D80588011.

@hx235 hx235 requested a review from jaykorean September 1, 2025 23:26
Copy link
Contributor

@jaykorean jaykorean left a comment

Choose a reason for hiding this comment

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

Thanks!

@facebook-github-bot
Copy link
Contributor

@hx235 merged this pull request in fc8bc60.

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.

3 participants