Scavenging does not work

Hi,

I’m using Event Store 3.0.0 RC2 from the website.

I cannot scavenge my database. When I click ‘Scavenge’ in the web interface the following message appears in the log:

[03348,12,14:46:38.446] SLOW BUS MSG [MainBus]: ScavengeDatabase - 109ms. Handle

r: StorageScavenger.

[03348,12,14:46:38.446] SLOW QUEUE MSG [MainQueue]: ScavengeDatabase - 110ms. Q:

0/0.

[03348,29,14:46:40.704] SCAVENGING: started scavenging of DB. Chunks count at st

art: 40. Options: alwaysKeepScavenged = False, mergeChunks = True

[03348,29,14:46:41.097] SCAVENGING: started to scavenge & merge chunks: #0-15 (c

hunk-000000.000002)

Resulting temp chunk file: c86c8b72-4a65-45f4-a89a-4e2b3063bf2d.scavenge.tmp.

[03348,29,14:46:41.707] SCAVENGING: error while scavenging DB.

An item with the same key has already been added.

How can I resolve this problem?

Thanks.

  • Morten.

What flags did you start with? Is this a database that you have upgraded from a previous version?

Can you try disabling merge chunks on the options?

Hi James,

We start it with:

The option to disable merging is:

DisableScavengeMerge

This obviously follows the patterns for commandline/js/etc so --disable-scavenger-merge if that works maybe we can grab the chunks in question to look through whats happening?

Greg

Hi Greg,

Is it possible to send this command (DisableScavengeMerge) to the server without restarting it? If so, how?

  • Morten.

No its command line/config file. We have been discussing the ability to make some of these config changes on the fly though.

I now tried restarting the server with --nomerge, but that just gives me some other error:

[02108,05,14:49:37.890] SCAVENGING: started scavenging of DB. Chunks count at start: 1. Options: alwaysKeepScavenged = False, mergeChunks = False

[02108,05,14:49:37.890] SCAVENGING: stopping scavenging pass due to non-completed TFChunk for position 0.

[02108,05,14:49:37.890] SCAVENGING: initial pass completed in 00:00:00.0001280.

[02108,05,14:49:37.890] SCAVENGING: total time taken: 00:00:00.0001906, total space saved: 0.

What to do?

  • Morten.

That says there is only one chunk and you cant scavenge a currently ongoing chunk (so its work is done) its not an error

Hi Greg,

But that cannot be the case, I have 25 files named chunk-* all with a fixed size 262,135 KB. Shouldn’t I be able to clear up some space using scavenging?

Ignore my last message. It was the wrong db. On the correct db, this error occurs:

[02780,33,10:39:53.796] SCAVENGING: started scavenging of DB. Chunks count at start: 41. Options: alwaysKeepScavenged = False, mergeChunks = False

[02780,33,10:39:53.886] SCAVENGING: started to scavenge & merge chunks: #0-15 (chunk-000000.000002)

Resulting temp chunk file: faeeeefd-7f82-4605-9906-39f33711c35a.scavenge.tmp.

[02780,33,10:39:54.194] SCAVENGING: error while scavenging DB.

An item with the same key has already been added.

And yes, it was started with --nomerge, which I can see from the log:

DISABLE SCAVENGE MERGING: True (–nomerge from command line)

Is it possible to send your database? If not I will add a significant amount of logging code and see if you can run it there.

It’s not possible to send the database.

Thanks!

Have you built from source before or are you strictly a binary user? I am going to instrument the code with a bunch of logging that you can run locally. Is it possible that you can build from sources to run it?

Any feedback on this Morten?

did this ever get resolved. Struggling with an Rc2 installation (yes,yes, Should have updated…) that I can’t scavenge (throws same error as described in this thread). GBs are stacking up

-Vidar

Long ago.

Rephrase: Any way to solve this without updating? Tried a test update some time ago and found that clients using .net lib stopped working, so was hoping to find a solution without updating. (or at least update to a version compat with 3.0rc2 clients)

(And yes I know I’m to blaim, but the current setup was supposed to be temporary…)

-Vidar

Hmm I would have to research that. I am not sure what changes were
involved. Also I am unsure of what client changes there may have been
I am 99% sure that a 3.0.0 client should still work with 3.6.2 (there
have only been additive changes that I know of hence the versioning)
from 3.0.0RC2 I am not positive.

ok, thanx for responding.

-Vidar