Hi all! We hard-deleted a dataset. It cannot be fo...
# all-things-deployment
b
Hi all! We hard-deleted a dataset. It cannot be found anymore in the UI, except for the recently viewed... Is this normal behaviour ?
m
This feels similar to an issue I had a while ago where I did something similar. I also did a hard delete and the item was gone from the Datahub database, but also still showed up in the recently viewed/recommendations/... . After looking around I found that those items seem to come from ElasticSearch and not from the database and a hard delete doesn't seem to remove the corresponding items in ElasticSearch. I don't know if is a bug or a feature.
b
Thanks for sharing this! Maybe a follow up question, but i want to doublecheck that a GraphQL query to retrieve (existing) datasets does not include the hard-deleted ones even though they come from ElasticSearch. Can someone verify that?
Otherwise it does not have a lot of value to just do a hard-delete in the Datahub tables. I would manually have to delete things too in Elasticsearch...
m
The GraphQL stuff specific to datasets worked correctly for me and only returned existing datasets (so without hard deleted ones).
b
Ah okay thanks. Hopefully Datahub will either fix it or it is an intended choice to do that. Either way, it can be a bit confusing, since the "recently viewed" also comes from a GraphQL call. To really understand it i need to dive deep in the code which is not my preference 🙂
m
They seem to use different ElasticSearch indexes and one of those indexes isn't kept in sync with hard deletes it looks like to me. So from my side it looks like a bug.
b
Indeed my thoughts as well. Hopefully someone from Acryl can think with us.
@delightful-ram-75848 sorry for mentioning you directly. Perhaps you or another colleague from Acryl could take a look at our issue? I still don't know if this is a bug or intentional behaviour... 😅
a
Thanks for the head up - @gray-shoe-75895 Could you check if this expected behavior?
g
Deleted stuff showing up in “recently viewed” sounds like a bug - definitely not expected behavior
Jan’s diagnosis here sounds correct - iirc we generate the recently viewed section from datahub_usage_events, whereas the hard deletes impact mysql and the <entity_type>_* indexes
cc @dazzling-yak-93039 - looks like we need an extra check to hide deleted entities from the “recently viewed” section
b
Thanks @gray-shoe-75895 for looking into this! Perhaps im asking too early, but when can we expect this fix for the upcoming release?
a
I created a ticket for this internally! We will prioritize it and get to it when we can!
s
Is there a way to do this manually while the fix is being developed? To clean up what's on the UI.
m
Is there any progress in this story? Facing the same problem
l
Hi, I'm having the same issue, is there any update regarding this issue? Thank you!
m
@lively-iron-79328 I haven't gotten any updates from @astonishing-answer-96712 or @dazzling-yak-93039 (which he referenced in my original thread) about this issue and as far as I know it hasn't been fixed.
a
Facing same problem here