-
Notifications
You must be signed in to change notification settings - Fork 713
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
FB8-67: Publish git hash in db log and via global status #991
Conversation
sql/mysqld.cc
Outdated
@@ -6739,6 +6746,12 @@ int mysqld_main(int argc, char **argv) | |||
|
|||
create_compress_gtid_table_thread(); | |||
|
|||
// NO_LINT_DEBUG | |||
sql_print_information("MySQL git hash: %s (%s)", git_hash, git_date); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sql_print_information("MySQL git hash: %s (%s)", git_hash, git_date); | |
sql_print_information(ER_DEFAULT(ER_GIT_HASH), "MySQL", git_hash, git_date); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -18527,8 +18527,8 @@ ER_PLACEHOLDER_50021 | |||
ER_PLACEHOLDER_50022 | |||
eng "Placeholder" | |||
|
|||
ER_PLACEHOLDER_50023 | |||
eng "Placeholder" | |||
ER_GIT_HASH |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this particular one? 50023?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same id (1523) was used in the 5.6 commit.
SET(GITHASH_DEPENDS ${GITHASH_DEPENDS} ${CMAKE_SOURCE_DIR}/.git/logs/HEAD) | ||
ENDIF() | ||
|
||
SET(GITHASH_PERL ${CMAKE_SOURCE_DIR}/cmake/githash.pl) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit does not have cmake/githash.pl
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with missing files.
|
||
# If the repository was modified (via push or pull) or if the | ||
# mysql_githash.h.in changed rebuild the mysql_githash.h file | ||
SET(GITHASH_HEADER_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/mysql_githash.h.in) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This commit does not have mysql_githash.h.in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with "#pragma once" issue addressed
sql/mysql_githash.h.in
Outdated
Do not hand edit this file. It is generated as part of the build | ||
process and contains git hashes and dates for MySQL and RocksDB | ||
*/ | ||
#pragma once |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Non-portable #pragma once
Please, change to standard header guards
#ifndef MYSQL_GITHASH_H
#define MYSQL_GITHASH_H
...
#endif
e9926c3
to
c3bd1c6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hermanlee has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
@@ -8639,6 +8671,8 @@ SHOW_VAR status_vars[] = { | |||
SHOW_SCOPE_GLOBAL}, | |||
{"Flush_commands", (char *)&refresh_version, SHOW_LONG_NOFLUSH, | |||
SHOW_SCOPE_GLOBAL}, | |||
{"Git_hash", (char *)git_hash, SHOW_CHAR}, | |||
{"Git_date", (char *)git_date, SHOW_CHAR}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we missing the Rocksdb_git_hash and Rocksdb_git_date entries in SHOW_VAR? It would be fine to add them here even though they only show empty strings for now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks to be missing the SHOW_SCOPE_GLOBAL parameters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can fix this. This looks to be the only issue.
ADD_CUSTOM_COMMAND(OUTPUT ${GITHASH_HEADER} | ||
COMMAND ${CMAKE_COMMAND} -E copy ${GITHASH_HEADER_SOURCE} ${GITHASH_HEADER} | ||
COMMAND ${CMAKE_COMMAND} -E echo ${GITHASH_PERL} ${GITHASH_PERL_OPTS} | ||
COMMAND perl ${GITHASH_PERL} ${GITHASH_PERL_OPTS} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This command fails with:
You must specify none or all of the git hashes and dates
Usage:
githash.pl [options]
I think you need to change the script to handle only adding the two rocksdb arguments.
sql/CMakeLists.txt
Outdated
SET(GITHASH_DEPENDS ${GITHASH_HEADER_SOURCE}) | ||
SET(GITHASH_PERL_OPTS --git_root=${CMAKE_SOURCE_DIR} --file=${GITHASH_HEADER}) | ||
SET(GITHASH_PERL_OPTS ${GITHASH_PERL_OPTS} | ||
--rocksdb_githash=none} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extra '}' at the end.
if ($mysql_git_hash eq "") { | ||
# retrieve the git hash and date for the main repository | ||
($mysql_git_hash, $mysql_git_date) = git_hash_and_date $root; | ||
# retrieve the git hash and date for the rocksdb submodule |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should also have this check to see if the rocksdb hash have been set. If not, then perform the git_hash_and_date, which requires "cd rocksdb".
Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: e4f22e0 Reference commit: f00855b Reference commit: 92bec02 Rocksdb hash and date is set to "none" until rocksdb is added.
@dutow has updated the pull request. Re-import the pull request |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hermanlee has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: e4f22e0 Reference commit: f00855b Reference commit: 92bec02 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: #991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth fbshipit-source-id: debd339
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: e4f22e0 Reference commit: f00855b Reference commit: 92bec02 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: #991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth fbshipit-source-id: 35c7328
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lth Differential Revision: D14603932 Pulled By: lth
percona#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook/mysql-5.6@e4f22e0 Reference commit: facebook/mysql-5.6@f00855b Reference commit: facebook/mysql-5.6@92bec02 Reference commit: facebook/mysql-5.6@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook/mysql-5.6#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
percona#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook/mysql-5.6@e4f22e0 Reference commit: facebook/mysql-5.6@f00855b Reference commit: facebook/mysql-5.6@92bec02 Reference commit: facebook/mysql-5.6@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook/mysql-5.6#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
percona#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook/mysql-5.6@e4f22e0 Reference commit: facebook/mysql-5.6@f00855b Reference commit: facebook/mysql-5.6@92bec02 Reference commit: facebook/mysql-5.6@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook/mysql-5.6#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
percona#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook/mysql-5.6@e4f22e0 Reference commit: facebook/mysql-5.6@f00855b Reference commit: facebook/mysql-5.6@92bec02 Reference commit: facebook/mysql-5.6@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook/mysql-5.6#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
percona#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook/mysql-5.6@e4f22e0 Reference commit: facebook/mysql-5.6@f00855b Reference commit: facebook/mysql-5.6@92bec02 Reference commit: facebook/mysql-5.6@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook/mysql-5.6#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
percona#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook/mysql-5.6@e4f22e0 Reference commit: facebook/mysql-5.6@f00855b Reference commit: facebook/mysql-5.6@92bec02 Reference commit: facebook/mysql-5.6@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook/mysql-5.6#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
… (facebook#991) Summary: Jira ticket: https://jira.percona.com/browse/FB8-67 Reference commit: facebook@e4f22e0 Reference commit: facebook@f00855b Reference commit: facebook@92bec02 Reference commit: facebook@408ea32ed2 Rocksdb hash and date is set to "none" until rocksdb is added. Pull Request resolved: facebook#991 Reviewed By: lloyd Differential Revision: D14603932 Pulled By: lth
Jira ticket: https://jira.percona.com/browse/FB8-67
Reference commit: e4f22e0
Reference commit: f00855b
Reference commit: 92bec02
Rocksdb hash and date is set to "none" until rocksdb is added.