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

feat(replica): close the replica and mark the dir_node as IO_ERROR when encounter read/write IO error #1473

Merged
merged 6 commits into from
Jun 14, 2023

Conversation

acelyc111
Copy link
Member

@acelyc111 acelyc111 commented May 11, 2023

#1383

This patch deal with the IO error populated from storage engine of read and write
operations, the replica will be closed and mark the dir_node as disk_status::IO_ERROR.
The dir_node marked as IO_ERROR will not be selected when new replicas created as
patch 4dcbb1e implemented.
This patch also add/update some unit tests.

@acelyc111 acelyc111 force-pushed the non_recoverable_rdb_err branch 2 times, most recently from 70ed3cf to c97692e Compare May 17, 2023 09:22
@acelyc111 acelyc111 force-pushed the non_recoverable_rdb_err branch from c97692e to 0d33aca Compare May 25, 2023 07:32
empiredan pushed a commit that referenced this pull request May 26, 2023
#1383

In prior implemention, every replica has a "dir_node status", if a dir_node has
some abnormal status (e.g. in space insufficient), we have to update all replicas'
referenced "dir_node status", it is implemented in `replica_stub::update_disks_status`.
This make the "dir_node status" updating path too long, and a bit of duplicate.

A new implemention is completed in #1473,
every replica has a reference of dir_node directly, so it would be easy to update replcia's
"dir_node status" by updating the referenced dir_node's status once.

Before the new implemention, this patch submit a minor refactor to remove
`replica_stub::update_disks_status` and related functions and variables. Also some unit
tests have been updated.
@acelyc111 acelyc111 force-pushed the non_recoverable_rdb_err branch 2 times, most recently from 4b57da3 to 0cb9110 Compare May 31, 2023 03:25
@codecov-commenter
Copy link

codecov-commenter commented Jun 4, 2023

Codecov Report

❗ No coverage uploaded for pull request base (master@4dcbb1e). Click here to learn what that means.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1473   +/-   ##
=========================================
  Coverage          ?   53.58%           
=========================================
  Files             ?       27           
  Lines             ?     2538           
  Branches          ?        0           
=========================================
  Hits              ?     1360           
  Misses            ?     1132           
  Partials          ?       46           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@acelyc111 acelyc111 force-pushed the non_recoverable_rdb_err branch 2 times, most recently from 0317989 to 7b89eaf Compare June 8, 2023 03:05
@acelyc111 acelyc111 force-pushed the non_recoverable_rdb_err branch from e10800e to 0f5db12 Compare June 8, 2023 11:43
@acelyc111 acelyc111 force-pushed the non_recoverable_rdb_err branch from 0f5db12 to 3d4b881 Compare June 8, 2023 12:00
@github-actions github-actions bot added the build label Jun 11, 2023
@acelyc111 acelyc111 changed the title refactor: fs manager feat(replica): close the replica and mark the dir_node as IO_ERROR when encounter read/write IO error Jun 11, 2023
@acelyc111 acelyc111 marked this pull request as ready for review June 11, 2023 09:50
src/replica/replica.cpp Outdated Show resolved Hide resolved
src/replica/test/replica_disk_test.cpp Outdated Show resolved Hide resolved
@cr-gpt
Copy link

cr-gpt bot commented Jun 14, 2023

Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information

@acelyc111 acelyc111 requested a review from hycdong June 14, 2023 07:00
@acelyc111 acelyc111 requested review from levy5307 and Smityz June 14, 2023 07:00
@acelyc111 acelyc111 merged commit 992cae4 into apache:master Jun 14, 2023
@empiredan empiredan mentioned this pull request Aug 22, 2023
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.

4 participants