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

Close shards on IO error #4149

Merged
merged 3 commits into from
Jan 12, 2024
Merged

Close shards on IO error #4149

merged 3 commits into from
Jan 12, 2024

Conversation

guilload
Copy link
Member

@guilload guilload commented Nov 16, 2023

Description

Close shards on IO error. Since now we call InitShards on ingesters, I abandoned the idea of decommissioning ingesters on IO error.

How was this PR tested?

Nope...

I tried:

  1. Open the log
  2. Change permissions of log files to read-only
  3. Append records

It does not fail on my MacBook. I suspect the file descriptor is still "writeable".

@guilload guilload force-pushed the guilload/ingest-v2/io-error branch from 73f85c5 to a6c844f Compare November 16, 2023 01:05
@guilload guilload force-pushed the guilload/ingest-v2/io-error branch 11 times, most recently from b040ab2 to 86a0c74 Compare December 19, 2023 15:50
@guilload guilload marked this pull request as ready for review December 19, 2023 15:55
@guilload guilload requested a review from fulmicoton December 19, 2023 15:55
@guilload guilload changed the title Handle IO error in ingest V2 Close shards on IO error Dec 19, 2023
Copy link
Contributor

@fulmicoton fulmicoton left a comment

Choose a reason for hiding this comment

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

failpoint can be used to return io Error in unit tests.

@guilload
Copy link
Member Author

Right, good idea! Let me update this PR with some failpoint-based unit tests, then.

@guilload guilload force-pushed the guilload/ingest-v2/io-error branch from 86a0c74 to 0b7983e Compare January 12, 2024 15:34
@guilload guilload merged commit 7458bbf into main Jan 12, 2024
4 checks passed
@guilload guilload deleted the guilload/ingest-v2/io-error branch January 12, 2024 16:03
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