Skip to content

Conversation

@laurynas-biveinis
Copy link
Contributor

  • Make m_earliest_snapshot_ts and m_read_opts protected fields in
    Rdb_transaction class. To replace
    their previous public uses, introduce new methods get_snapshot_timestamp &
    create_explicit_snapshot; use has_snapshot in more places.
    Remove unused return value for rdb_tx_acquire_snapshot.
  • Factor out Rdb_transaction::on_finish for the common code in on_commit and
    on_rollback methods.
  • Delete move constructor and move assignment operator for
    Rdb_compact_filter_factory class, replace "{}" with "= default" for other
    special members.
  • Extract the gnarly regexes to make SHOW ENGINE ROCKSDB TRANSACTION STATUS
    output deterministic to a separate include file
    mysql-test/suite/rocksdb/include/show_transaction_status.inc
- Make m_earliest_snapshot_ts and m_read_opts protected fields in
  Rdb_transaction class. To replace
  their previous public uses, introduce new methods get_snapshot_timestamp &
  create_explicit_snapshot; use has_snapshot in more places.
  Remove unused return value for rdb_tx_acquire_snapshot.
- Factor out Rdb_transaction::on_finish for the common code in on_commit and
  on_rollback methods.
- Delete move constructor and move assignment operator for
  Rdb_compact_filter_factory class, replace "{}" with "= default" for other
  special members.
- Extract the gnarly regexes to make SHOW ENGINE ROCKSDB TRANSACTION STATUS
  output deterministic to a separate include file
  mysql-test/suite/rocksdb/include/show_transaction_status.inc
@facebook-github-bot
Copy link

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

virtual void release_snapshot(TABLE_TYPE table_type) = 0;

bool has_snapshot(TABLE_TYPE table_type) const {
assert(m_read_opts[INTRINSIC_TMP].snapshot == nullptr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey Laurynas, I wonder why the snapshot for intrinsic tmp table is always null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Temp tables are always private to the owning connection and don't need to participate in isolation concerns

@facebook-github-bot
Copy link

This pull request has been merged in 1888f30.

@laurynas-biveinis laurynas-biveinis deleted the oldest-snapshot-cleanups branch August 19, 2024 09:30
sunshine-Chun pushed a commit to sunshine-Chun/mysql-5.6 that referenced this pull request Sep 4, 2024
Summary:
- Make m_earliest_snapshot_ts and m_read_opts protected fields in
  Rdb_transaction class. To replace
  their previous public uses, introduce new methods get_snapshot_timestamp &
  create_explicit_snapshot; use has_snapshot in more places.
  Remove unused return value for rdb_tx_acquire_snapshot.
- Factor out Rdb_transaction::on_finish for the common code in on_commit and
  on_rollback methods.
- Delete move constructor and move assignment operator for
  Rdb_compact_filter_factory class, replace "{}" with "= default" for other
  special members.
- Extract the gnarly regexes to make SHOW ENGINE ROCKSDB TRANSACTION STATUS
  output deterministic to a separate include file
  mysql-test/suite/rocksdb/include/show_transaction_status.inc

Pull Request resolved: facebook#1487
GitHub Author: Laurynas Biveinis <laurynas.biveinis@gmail.com>

Test Plan: Imported from GitHub, without a `Test Plan:` line.

Reviewers: rpan, #mysql_eng

Reviewed By: rpan

Differential Revision: https://phabricator.intern.facebook.com/D61214541
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants