Skip to content

Conversation

@laurynas-biveinis
Copy link
Contributor

  • 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.

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@laurynas-biveinis
Copy link
Contributor Author

As discussed offline, will add comments explaining why two different ways to check RDB iterator status are needed

@laurynas-biveinis laurynas-biveinis marked this pull request as draft April 3, 2024 13:56
- 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.
@facebook-github-bot
Copy link

@laurynas-biveinis has updated the pull request. You must reimport the pull request before landing.

@laurynas-biveinis
Copy link
Contributor Author

Unfortunately there is a small conflict with #1445, the second PR to go in will have to be rebased

@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

1 similar comment
@facebook-github-bot
Copy link

@luqun has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link

This pull request has been merged in ee2c2fb.

@laurynas-biveinis laurynas-biveinis deleted the myr-iterator-status branch April 15, 2024 10:50
sunxiayi pushed a commit to sunxiayi/mysql-5.6 that referenced this pull request Apr 30, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 16, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 30, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 29, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 30, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 31, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 2, 2024
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
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 6, 2024
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants