Skip to content

Conversation

@laurynas-biveinis
Copy link
Contributor

All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

@laurynas-biveinis
Copy link
Contributor Author

This resulted from me proving to myself the lifetime of ha_rocksdb::m_pack_buffer during range locking debugging.
Valgrind testing still ongoing

@laurynas-biveinis
Copy link
Contributor Author

Valgrind testing timed out after a few days, with no errors up to that point (45% of rocksdb,rocksdb_clone,rocksdb_rpl,rocksdb_sys_vars,rocksdb_dd_innodb, no --big-test)

@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

laurynas-biveinis commented Apr 18, 2024 via email

…fer lifetime

All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind and AddressSanitizer as inaccessible. Add
additional handling for m_pack_buffer: since its use it's fully contained in
Rdb_key_def::pack_record, annotate it as such.

At the same time extend the memory debugging macros in
include/memory_debugging.h to cover AddressSanitizer too in addition to
Valgrind.
@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

@luqun , extended the MEM_* macros to cover ASan, no regressions there, & moved the TODO comment. Ready for review

@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 fdf68f7.

@laurynas-biveinis laurynas-biveinis deleted the myr-handler-buffers branch April 26, 2024 07:07
sunxiayi pushed a commit to sunxiayi/mysql-5.6 that referenced this pull request Apr 30, 2024
…otate m_pack_buffer lifetime

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446
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: chni

Differential Revision: https://phabricator.intern.facebook.com/D56051395
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 17, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 21, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request May 30, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 29, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 30, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Jul 31, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 2, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/mysql-5.6 that referenced this pull request Aug 6, 2024
…fer lifetime (facebook#1446)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 16, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Apr 18, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 28, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 28, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 28, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Apr 30, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request May 4, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to percona/percona-server that referenced this pull request Jun 4, 2025
…fer lifetime (#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 4, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Jun 5, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jul 31, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Jul 31, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Jul 31, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Jul 31, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Jul 31, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
percona-ysorokin pushed a commit to percona-ysorokin/percona-server that referenced this pull request Aug 2, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Aug 5, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Oct 22, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
inikep pushed a commit to inikep/percona-server that referenced this pull request Oct 27, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Oct 30, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 4, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 4, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 5, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 5, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 6, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
dlenev pushed a commit to dlenev/percona-server that referenced this pull request Nov 7, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
lukin-oleksiy pushed a commit to lukin-oleksiy/percona-server that referenced this pull request Nov 11, 2025
…fer lifetime (percona#1446)

Upstream commit ID: facebook/mysql-5.6@fdf68f720c84
PS-9395: Merge percona-202404 (https://jira.percona.com/browse/PS-9395)

Summary:
All the key packing buffers in the MyRocks handler have exactly the same
lifetime between alloc_key_buffers and free_key_buffers. Thus allocate a single
large buffer and point the key packing buffers to offsets inside it, reducing
number of calls to the heap allocator on table opening/close code path. Annotate
the padding bytes for Valgrind as inaccessible. Add additional handling for
m_pack_buffer: since its use it's fully contained in Rdb_key_def::pack_record,
annotate it as such.

Pull Request resolved: facebook/mysql-5.6#1446

Differential Revision: D56051395

fbshipit-source-id: f503d56efbaee8a2072fe5701eec4783d7c1cce9
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.

3 participants