EventStore.Akka.Persistence icon indicating copy to clipboard operation
EventStore.Akka.Persistence copied to clipboard

Why did not released hdd space after deleteSnapshots?

Open AndreyLadniy opened this issue 7 years ago • 9 comments

I try use deleteSnapshots but only have incresed space usage. I can't undestand, plugin only stores additional DeleteEvent and don't delete it from the stream in fact? https://github.com/EventStore/EventStore.Akka.Persistence/blob/35f14449433c227091d28ecedade04bc991e6c1a/src/main/scala/akka/persistence/eventstore/snapshot/EventStoreSnapshotStore.scala#L66

AndreyLadniy avatar Feb 23 '18 04:02 AndreyLadniy

Yes, EventStore is an immutable append only storage.

t3hnar avatar Feb 23 '18 13:02 t3hnar

To be fair it is not immutable scavenge can recover space of things you decide to delete.

On Fri, Feb 23, 2018 at 1:49 PM, Yaroslav Klymko [email protected] wrote:

Yes, EventStore is a immutable append only storage.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/EventStore/EventStore.Akka.Persistence/issues/41#issuecomment-368013604, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXRWh58BLlEJeWC9yJ20aqKVdhseKpYks5tXsHmgaJpZM4SQYjl .

-- Studying for the Turing test

gregoryyoung avatar Feb 23 '18 14:02 gregoryyoung

Yes, EventStore is an immutable append only storage.

This leads to the inability to use the ES through EventStore.Akka.Persistence in production. In my case with frequent snapshots I have 25% for bussines events and 75% for snapshot events with a simple test.

AndreyLadniy avatar Feb 23 '18 18:02 AndreyLadniy

@AndreyLadniy you still can set up different storage for snapshots, and keep using event store for events

t3hnar avatar Feb 23 '18 19:02 t3hnar

Why do you need your old snapshots? Is something as simple as setting maxCount on snapshot streams enough for you?

gregoryyoung avatar Feb 23 '18 23:02 gregoryyoung

@t3hnar Thanks, I already thought about it, if no solutions can be made with the the ES and do it so. @gregoryyoung I don't need old snapshots, I need only the one last. I can't undestand how it can be made if maxCount can be setted for the concrete stream, but shapshots stream contains the snapshot of every PersistentActor.

AndreyLadniy avatar Feb 24 '18 04:02 AndreyLadniy

@AndreyLadniy could you please double check, there should be separate snapshot stream per persistenceId

t3hnar avatar Feb 24 '18 07:02 t3hnar

I try use maxCount for every snapshot stream. maxCount hides old snapshots, but uses hdd space which releases with scavege only. So deleteSnapshots can't be used as a part of akka-persistence (for disk space releasing), but deletion can be done with ES side with manual updating maxCount and periodic scavenge

AndreyLadniy avatar Feb 26 '18 10:02 AndreyLadniy

This is correct. You can also use maxAge to keep snapshots for a given period of time.

On Mon, Feb 26, 2018 at 10:33 AM, Andrey Ladniy [email protected] wrote:

I try use maxCount for every snapshot stream. maxCount hides old snapshots, but uses hdd space which releases with scavege only. So deleteSnapshots can't be used as a part of akka-persistence (for disk space releasing), but deletion can be done with ES side with manual updating maxCount and periodic scavenge

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/EventStore/EventStore.Akka.Persistence/issues/41#issuecomment-368457746, or mute the thread https://github.com/notifications/unsubscribe-auth/AAXRWtdVg4YmCdZQUv3CdMgMXFc7aUYeks5tYoh2gaJpZM4SQYjl .

-- Studying for the Turing test

gregoryyoung avatar Feb 26 '18 10:02 gregoryyoung