代码改变世界

MySQL Bug:No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request

2021-09-13 22:06  潇湘隐者  阅读(403)  评论(0编辑  收藏  举报

监控发现公司一台MySQL 8.0.26 的错误日志中出现大量下面告警信息:

 

[Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.

 

  搜索资料发现,其实这个是一个Bug来着(详情见参考资料的链接),如果MySQL实例没有任何MySQL keyring组件的话,就可能遇到这个Bug

 

[13 May 12:43] Marcelo Altmann

Description:

I

If your server is started without any keyring component, querying performance_schema.keyring_component_status logs an warning to the error log:

 

 

 

 

2021-05-13T12:06:03.625555Z 112 [Warning] [MY-013712] [Server] No suitable 'keyring_component_metadata_query' service implementation found to fulfill the request.

 

 

 

How to repeat:

 

 

Start MySQL without any keyring component and log verbosity = 3.

 

Run: SELECT * FROM  performance_schema.keyring_component_status;

 

[13 May 12:50] MySQL Verification Team

Hello Marcelo,

 

 

 

 

Thank you for the report and feedback.

 

 

 

 

regards,

 

Umesh

 

[26 Aug 16:27] Marcelo Altmann

Patch generated based on tag mysql-8.0.26

 

 

 

 

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

 

Contribution: bug_103684.patch (application/octet-stream, text), 824 bytes.

[27 Aug 14:00] MySQL Verification Team

Thank you for your contribution.

 

 

 

 

regards,

 

Umesh

 

 

检查验证,确实没有任何mysql  keyring组件

 

mysql> SELECT * FROM performance_schema.keyring_component_status;
Empty set (0.00 sec)
mysql>

 

bug_103684.patch资料如下

 

diff --git a/sql/server_component/mysql_server_keyring_lockable_imp.cc b/sql/server_component/mysql_server_keyring_lockable_imp.cc
index 9c94d2ee8c5..7b6eb414e7d 100644
--- a/sql/server_component/mysql_server_keyring_lockable_imp.cc
+++ b/sql/server_component/mysql_server_keyring_lockable_imp.cc
@@ -391,7 +391,8 @@ DEFINE_BOOL_METHOD(Keyring_metadata_query_service_impl::is_initialized, ()) {
 DEFINE_BOOL_METHOD(Keyring_metadata_query_service_impl::init,
                    (my_h_keyring_component_metadata_iterator *
                     metadata_iterator)) {
-  if (check_service(internal_keyring_component_metadata_query,
+  if (internal_keyring_component_metadata_query == nullptr ||
+      check_service(internal_keyring_component_metadata_query,
                     COMPONENT_METADATA_QUERY))
     return true;
 

 

 

 

参考资料:

https://bugs.mysql.com/bug.php?id=103684

https://dev.mysql.com/doc/dev/mysql-server/latest/group__group__keyring__component__services__inventory.html