Skip to content

Abort a read when the disk is known to be bad - #10286

Merged
moonchen merged 4 commits into
apache:masterfrom
moonchen:abort-read-on-bad
Sep 25, 2023
Merged

moonchen merged 4 commits into
apache:masterfrom
moonchen:abort-read-on-bad

Conversation

@moonchen

Copy link
Copy Markdown
Contributor

Reads on a known bad disk can read corrupt cache metadata, which causes a crash. Abort reads early on a bad disk so that ATS is less likely to crash after a disk is marked bad.

Reads on a known bad disk can read corrupt cache metadata, which causes
a crash.  Abort reads early on a bad disk so that ATS is less likely to
crash after a disk is marked bad.
@bryancall bryancall added this to the 10.0.0 milestone Aug 28, 2023
Comment thread iocore/cache/Cache.cc Outdated
@SolidWallOfCode

Copy link
Copy Markdown
Member

Perhaps this should go before trying the lock. Do you really want to reschedule for the lock if the disk is bad?

@moonchen

Copy link
Copy Markdown
Contributor Author

[approve ci rocky]

@SolidWallOfCode SolidWallOfCode left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The new code should really be outside the brace at line 2182, because that's for scoping the mutex. You can commit this or I'll approve an update with that change.

@moonchen

Copy link
Copy Markdown
Contributor Author

The new code should really be outside the brace at line 2182, because that's for scoping the mutex. You can commit this or I'll approve an update with that change.

Sounds good. I moved it.

@moonchen
moonchen merged commit bc8bfa6 into apache:master Sep 25, 2023
@moonchen moonchen modified the milestones: 10.0.0, 9.2.3 Oct 2, 2023
@zwoop

zwoop commented Oct 16, 2023

Copy link
Copy Markdown
Contributor

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 9.2.3, 9.2.4 Oct 16, 2023
zwoop pushed a commit that referenced this pull request Oct 16, 2023
* Abort a read when the disk is known to be bad

Reads on a known bad disk can read corrupt cache metadata, which causes
a crash.  Abort reads early on a bad disk so that ATS is less likely to
crash after a disk is marked bad.

(cherry picked from commit bc8bfa6)
traeak pushed a commit to traeak/trafficserver that referenced this pull request Dec 15, 2023
* Abort a read when the disk is known to be bad

Reads on a known bad disk can read corrupt cache metadata, which causes
a crash.  Abort reads early on a bad disk so that ATS is less likely to
crash after a disk is marked bad.

(cherry picked from commit bc8bfa6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants