Repository navigation
osd: Fix condition for rolling forward pg log entries - #68888
Conversation
|
jenkins test pr |
|
jenkins test make check arm64 |
c1cfd97 to
026d460
Compare
|
jenkins test make check arm64 |
bill-scales
left a comment
There was a problem hiding this comment.
Approve - can you look at tidying up the dout statement
| * above */ | ||
| if (transaction_applied && | ||
| p->soid > info.last_backfill) { | ||
| if (transaction_applied && !is_acting(pg_whoami)) { |
There was a problem hiding this comment.
ACK: This change deserves some explanation
The old test "if (transaction_applied &&p->soid > info.last_backfill)" didn't work:
For EC pools transaction_applied = !op.backfill_or_async_recovery = should_send
PrimaryLogPG::should_send_op
bool should_send =
hoid.pool != (int64_t)info.pgid.pool() ||
hoid <= last_backfill_started ||
hoid <= recovery_state.get_peer_info(peer).last_backfill;
So the old test could never be true for EC pools because the oid can't be <= and > than last_backfill at the same time.
For Replica pools transaction_applied = should_send on the replica shards, but strangely is always true on the primary shard (perhaps another bug?). However roll_forward is essentially a NOP for Replica pools so it doesn't really matter whether we try to roll forward or not.
The new test now aggressively rolls forward transactions to shards which are outside of the acting set (which means they must be backfilling or performing async_recovery). Rolling forward in these cases is safe because they won't be considered when determining last_update in a future peering cycle. Rolling forward in these cases is necessary because of the skip_rollforward case earlier in this function which will not only skip the new log entry but will skip any other entries that have a pending rollforward. By aggressively calling rollforward here we avoid log entries that we want to be rolled forward from being skipped.
026d460 to
f7d9e89
Compare
|
jenkins test windows |
1 similar comment
|
jenkins test windows |
|
I was reviewing the QA test results for this PR and saw this issue that looks new in a thrash EC test: @MattyWilliams22 @bill-scales @aainscow could one of you take a look at the failure and let me know if it looks related to this PR? |
@amathuria This is not related to this PR, its a base code issue in the PeeringStateMachine concerning reservations for backfill - this part of the state machine has many race hazards. I've opened https://tracker.ceph.com/issues/77096 |
@bill-scales Thanks for checking and opening the tracker! I'll update the QA run review |
f7d9e89 to
ec7afb5
Compare
|
jenkins test api |
1 similar comment
|
jenkins test api |
bill-scales
left a comment
There was a problem hiding this comment.
LGTM
Additional bug fix is to invalidate pwlc if the shard doing backfill/async recovery rolls forward the log entry as it is appended to the log. This ensures that these shards do not have pwlc that is ahead of the last completed write I/O.
It is safe to do this for the same reasons as it was safe to do it when the roll forward was skipped (lines 4809-4819).
https://tracker.ceph.com/issues/76577
This PR fixes a critical bug where writes to backfilling shards (those not in the acting set) below the last_backfill watermark were failing to roll forward. This issue previously caused silent storage leaks (generation'd objects not being cleaned up), but with the introduction of omap support in EC pools, skipping the roll forward would result in dropped omap updates and severe data integrity issues.
The condition has been updated to check whether the shard is in the acting set. By explicitly checking !is_acting(pg_whoami), we ensure that updates to backfilling shards (which are not in the acting set) are properly rolled forward as soon as they are applied.
It is safe to roll forward updates to shards that are not in the acting set as soon as they are applied because these shards are not used by Peering when determining the authoritative log and they do not need to be read for recovery. The worst consequence of rolling forward updates on these shards early is that if the update later gets rolled back the object will be marked as missing on this shard and will generate a little extra recovery work.
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.