How do you delete an entity in lagom?


(franz) #1

Hi,

How do you delete an entity in lagom? and by delete, i mean for the purpose of freeing up disk space by deleting events, snapshots, and all other data associated to that entity within that microservice?

Thanks,
Franz


(Alan Klikic) #2

@franz you need to delete it from the database. Message and snapshot table delete by entiity id. Make sure that entity with that entity id is passivated in Lagom.


(franz) #3

Thanks @aklikic. Is it a safe operation that the microservice itself can do? Or does the microservice need to be down first before manually deleting the entry in the database?


(Alan Klikic) #4

@franz if you can afford stopping it then this is, for sure, the most reliable. But again if you delete it in runtime and entity is not passivated you can always restart the service.