Skip to content
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

DB-962 : broken memory management in TokuDB 5.6.28-76.1 #480

Merged
merged 1 commit into from
May 5, 2016

Conversation

george-lorch
Copy link
Contributor

Issue is in flags that analysis uses when setting up DBT structs to extract keys from PerconaFT.
Code previously used DB_DBT_REALLOC for some unknown reason rather than '0'.
DB_DBT_REALLOC places the burden of managing the memory of the returned keys on the user of PerconaFT,
'0' leaves that burden with PurconaFT and the key/value data is managed and freed by the cursor->close call.
There is no apparant performance difference between the two or any benefit of using one over the other.

  • Removed DB_DBT_REALLOC from initial DBT key flags.
  • Verified that memory is properly managed on cursor->c_next and cursor->close calls.

Issue is in flags that analysis uses when setting up DBT structs to extract keys from PerconaFT.
Code previously used DB_DBT_REALLOC for some unknown reason rather than '0'.
DB_DBT_REALLOC places the burden of managing the memory of the returned keys on the user of PerconaFT,
'0' leaves that burden with PurconaFT and the key/value data is managed and freed by the cursor->close call.
There is no apparant performance difference between the two or any benefit of using one over the other.
- Removed DB_DBT_REALLOC from initial DBT key flags.
- Verified that memory is properly managed on cursor->c_next and cursor->close calls.
@george-lorch
Copy link
Contributor Author

@george-lorch george-lorch merged commit fd9dfe3 into percona:5.6 May 5, 2016
@george-lorch george-lorch deleted the ps-5.6-DB-962 branch May 5, 2016 00:20
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 23, 2020
percona#480)

Summary:
This is the last pull request for the const fix of all the files under storage/rocksdb.

The changes will improve the robustness of the code and make it easier for refactoring in the future.
Closes facebook/mysql-5.6#480

Differential Revision: D4349370

Pulled By:
sidigit1205

fbshipit-source-id: bbe7963

fbshipit-source-id: 6de83f61428
inikep pushed a commit to inikep/percona-server that referenced this pull request Feb 24, 2021
percona#480)

Summary:
This is the last pull request for the const fix of all the files under storage/rocksdb.

The changes will improve the robustness of the code and make it easier for refactoring in the future.
Closes facebook/mysql-5.6#480

Differential Revision: D4349370

Pulled By:
sidigit1205

fbshipit-source-id: bbe7963

fbshipit-source-id: 6de83f61428
inikep pushed a commit to inikep/percona-server that referenced this pull request Nov 15, 2021
percona#480) (percona#480)

Summary:
This is the last pull request for the const fix of all the files under storage/rocksdb.

The changes will improve the robustness of the code and make it easier for refactoring in the future.
Closes facebook/mysql-5.6#480

Differential Revision: D4349370 (facebook/mysql-5.6@649a967)

Pulled By: sidigit1205

fbshipit-source-id: ac7d4598875
ldonoso pushed a commit to ldonoso/percona-server that referenced this pull request Mar 15, 2022
percona#480) (percona#480)

Summary:
This is the last pull request for the const fix of all the files under storage/rocksdb.

The changes will improve the robustness of the code and make it easier for refactoring in the future.
Closes facebook/mysql-5.6#480

Differential Revision: D4349370

Pulled By: sidigit1205
inikep pushed a commit to inikep/percona-server that referenced this pull request Apr 9, 2024
percona#480) (percona#480)

Summary:
This is the last pull request for the const fix of all the files under storage/rocksdb.

The changes will improve the robustness of the code and make it easier for refactoring in the future.
Closes facebook/mysql-5.6#480

Differential Revision: D4349370

Pulled By: sidigit1205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant