hello everyone. I just wonder.. what is the main p...
# all-things-deployment
m
hello everyone. I just wonder.. what is the main purpose of using
mysql
in datahub datahub? Why do you use
mysql
even though there is an
elastic search
?
b
Elastic search only stores the latest metadata for each entity. MySQL stores ALL metadata through history in a versioned document store
Elastic is better suited for less data since its more expensive to create indexes on all those fields. Document store (MySQL) is more efficient for storing a lot of un-indexed documents
plus1 8
m
Sorry I haven't study the source code, can I consider that the data displayed on the WebUI is obtained from ES, not mysql? for example the edited description of the fields...
b
So the search results are powered through Elastic, but the actually source of truth for the data you see is the document store - MySQL
r
@big-carpet-38439 Hi. Thanks for your explaination. If i goit the point, even if i keep ES dockerized, if for any reason the deployment krashes, ES data will go back to "fresh new state" but won't affect the Datahub usage. Juste the last search will be remove and so ?
b
So typically if the container crashes / goes down the data will not be lost (unless you create a branch new docker volume) - But if elastic loses all data, then you can run a restore indices job that will force reindex everything back into Elastic! @early-lamp-41924 can discuss more