-
Notifications
You must be signed in to change notification settings - Fork 721
Refactor MyRocks iterator status handling #1444
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
Refactor MyRocks iterator status handling #1444
Conversation
|
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
As discussed offline, will add comments explaining why two different ways to check RDB iterator status are needed |
- Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature.
338d19b to
35e6174
Compare
|
@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing. |
|
Unfortunately there is a small conflict with #1445, the second PR to go in will have to be rebased |
|
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
1 similar comment
|
@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
|
This pull request has been merged in ee2c2fb. |
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 GitHub Author: Laurynas Biveinis <laurynas.biveinis@gmail.com> Test Plan: Imported from GitHub, without a `Test Plan:` line. Reviewers: herman, chni, #mysql_eng Reviewed By: herman, chni Differential Revision: https://phabricator.intern.facebook.com/D55642013
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
Summary: - Move is_valid_iterator from ha_rocksdb.cc to rdb_iterator.cc, rename to is_valid_rdb_iterator, make its argument const reference. Remove redundant rdb_persist_corruption_marker call because rdb_handle_io_error calls it too. - Introduce Rdb_iterator_base::convert_iterator_status similar to existing Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic there and additionally handle any other non-I/O errors by saving them in the transaction for a later return. - Make Rdb_iterator_base::convert_get_status take transaction by reference, make it const method. Propagate down the callstack pointer-to-reference changes: rdb_should_hide_ttl_rec, rdb_tx_set_status_error. - Mark touched functions and methods [[nodiscard]] where appropriate. - Annotate rdb_persist_corruption_marker with cold and noinline attributes. - Remove dbug_change_status_to_corrupted, use DBUG_EVALUATE_IF so that the variable gets its final value right at the declaration and could be made const too. This is split out from the range locking feature. Pull Request resolved: facebook#1444 Differential Revision: D55642013 fbshipit-source-id: eeb5d5b
is_valid_rdb_iterator, make its argument const reference. Remove redundant
rdb_persist_corruption_marker call because rdb_handle_io_error calls it too.
Rdb_iterator_base::convert_get_status, move HA_ERR_END_OF_FILE-returning logic
there and additionally handle any other non-I/O errors by saving them in the
transaction for a later return.
it const method. Propagate down the callstack pointer-to-reference changes:
rdb_should_hide_ttl_rec, rdb_tx_set_status_error.
variable gets its final value right at the declaration and could be made const
too.
This is split out from the range locking feature.