You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
FC_THROW_EXCEPTION(fc::exception, "ES database is not up in url ${url}", ("url", my->_elasticsearch_node_url));
It is inappropriate to use the _nodes query to check, because the user may not have specific permissions.
Actually the check should be moved to plugin_initialize(), because plugin_startup() is called after database::open() which could do a partial replay which would already need to insert data into ES. Update: this has been addressed via 679e645 in #1997.
Note: the same check is also used in elasticsearch_plugin::get_account_history(...):
By the way, the same check in es_objects has a line es.auth = my->_es_objects_index_prefix; which is obviously wrong. This has been fixed via 8cc9e4c in #2570.
Bug Description
The
checkES()
function returnstrue
even if there is an error in the response:bitshares-core/libraries/utilities/elasticsearch.cpp
Lines 39 to 49 in c06d09c
bitshares-core/libraries/plugins/elasticsearch/elasticsearch_plugin.cpp
Lines 535 to 543 in c06d09c
It is inappropriate to use the
_nodes
query to check, because the user may not have specific permissions.Actually the check should be moved toUpdate: this has been addressed via 679e645 in #1997.plugin_initialize()
, becauseplugin_startup()
is called afterdatabase::open()
which could do a partial replay which would already need to insert data into ES.Note: the same check is also used in
elasticsearch_plugin::get_account_history(...)
:bitshares-core/libraries/plugins/elasticsearch/elasticsearch_plugin.cpp
Lines 620 to 623 in 1d1fb99
By the way, the same check in
es_objects
has a linees.auth = my->_es_objects_index_prefix;
which is obviously wrong. This has been fixed via 8cc9e4c in #2570.bitshares-core/libraries/plugins/es_objects/es_objects.cpp
Lines 403 to 414 in 6b61772
Impacts
Describe which portion(s) of BitShares Core may be impacted by this bug. Please tick at least one box.
CORE TEAM TASK LIST
The text was updated successfully, but these errors were encountered: