Skip to content
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

Support hard delete in core #371

Closed
parthlawate opened this issue Mar 9, 2023 · 15 comments · Fixed by Sunbird-RC/sunbird-rc-core#276
Closed

Support hard delete in core #371

parthlawate opened this issue Mar 9, 2023 · 15 comments · Fixed by Sunbird-RC/sunbird-rc-core#276
Assignees

Comments

@parthlawate
Copy link
Member

Currently, only soft delete functionality is supported.
We need to provide an option via an env flag to switch between hard/soft delete (the default is soft delete).
When a hard delete is executed, the respective record from all the respective tables and from ES needs to be removed/deleted.

@chopadetejaswini
Copy link

Implementation steps :

  1. understand the Soft delete code in project, difference between hard delete and soft delete
  2. understand about config variable and set it
  3. study the code of soft delete
  4. write code for hard delete
  5. test the hard delete

@chopadetejaswini
Copy link

tried hard delete using OsGrapg, Graph, Transaction but removeVertex() of Graph and rollbackTransaction() of DataProvider showing error- cannot resolve method. So will tring to solve this error

@chopadetejaswini
Copy link

write logic for hard delete, set variable / flag , but in Postman its showing response OK but when I tried to check database its showing soft delete even Hard delete enable is true, so trying to solve this

@chopadetejaswini
Copy link

I have to get sign data from JSON node and need to convert to string so in RegistryEntityController

@chopadetejaswini
Copy link

Now hard delete function is worked on database and deleted entity will add in revocation list, revocation list table name is RevokedCredentialto

@chopadetejaswini
Copy link

Started working for Support hard delete for Elastic Search, Write hard delete code in ElasticServiceImpl class, In ElasticSearchActor add delete case for both Soft and hard delete, in this used if condition , for hard delete wrote getDeleteType() in ESMessage class and added getter setter methods. In application.yml file make search - Provder name -ElasticSearchService

@chopadetejaswini
Copy link

now hard delete supports Elastic search also, Raised PR and shared link with Tejash Varde

@chopadetejaswini chopadetejaswini moved this from In Progress to In QA in Sunbird RC Roadmap 2023-24 Apr 19, 2023
@chopadetejaswini
Copy link

I want to make some changes in code, I tried for this and make some changes but now my project build is failed so trying to solve that issue

@chopadetejaswini
Copy link

now project build failed error is overcome, trying to run soft delete API, working on that

@Renuka-S Renuka-S moved this from In QA to In Progress in Sunbird RC Roadmap 2023-24 Apr 21, 2023
@chopadetejaswini
Copy link

Hard delete is working, trying for Soft delete, not able to find deleted flag in ES after call Delete API, facing nullPointerException cause jsonNode was not able to get osSigned data solved that exception

@chopadetejaswini
Copy link

Trying to for soft delete, whenever I try to call DELETE API its shows successful response but record is not deleting logically even the Environment variable set false

@chopadetejaswini
Copy link

Task is completed, now Hard delete supports DB and ES both, will raise the PR today

@chopadetejaswini
Copy link

Raised PR

@chopadetejaswini chopadetejaswini moved this from In Progress to In QA in Sunbird RC Roadmap 2023-24 Apr 28, 2023
@chopadetejaswini chopadetejaswini moved this from In QA to In review in Sunbird RC Roadmap 2023-24 Jul 6, 2023
@srprasanna
Copy link
Collaborator

@holashchand can you review this PR and close?

@srprasanna srprasanna linked a pull request Jan 16, 2024 that will close this issue
@holashchand
Copy link
Contributor

@github-project-automation github-project-automation bot moved this from In review to Released in Sunbird RC Roadmap 2023-24 Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Released
Development

Successfully merging a pull request may close this issue.

5 participants