Skip to content

Conversation

@laurynas-biveinis
Copy link
Contributor

The size of this structure is 64 bits and passing it around by references and
pointers only adds one level of indirection for no gain.

  • Convert all its reference uses to direct value ones
  • Make rdb_netbuf_read_gl_index return the value directly instead of writing to
    a pointer output parameter.
  • Remove a couple of dead declarations
  • Apply const, auto, [[nodiscard]] to touched code. Handle
    local_dict_manager->put_auto_incr_val failure in
    ha_rocksdb::commit_inplace_alter_table by crashing, like other error handling
    code in this method does.
  • Add a couple of reserve calls before inserting into C++ containers when the
    final size is known in advance.
  • Reorder Rdb_index_info fields to remove padding gaps
The size of this structure is 64 bits and passing it around by references and
pointers only adds one level of indirection for no gain.

- Convert all its reference uses to direct value ones
- Make rdb_netbuf_read_gl_index return the value directly instead of writing to
  a pointer output parameter.
- Remove a couple of dead declarations
- Apply const, auto, [[nodiscard]] to touched code. Handle
  local_dict_manager->put_auto_incr_val failure in
  ha_rocksdb::commit_inplace_alter_table by crashing, like other error handling
  code in this method does.
- Add a couple of reserve calls before inserting into C++ containers when the
  final size is known in advance.
- Reorder Rdb_index_info fields to remove padding gaps
@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 laurynas-biveinis deleted the gl_index_id-by-val branch March 10, 2025 13:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

3 participants