Hi Samuel,

This is when the server exists for some reason?

(If it's an internal exception, there should be a stack trace in the log file.)

What operating system are you running on?

What's in the new Data-0002 directory?

It does look like some defensive measures are needed to not choose to use the incomplete storage directory.

    Andy


On 06/02/2024 09:26, Samuel Börlin wrote:
Hi everybody,

I recently noticed that when Fuseki (4.10.0) is stopped during a compaction 
task (started via the HTTP endpoint `/$/compact/{name}?deleteOld=true`)
then it uses the new and still incomplete database (e.g. Data-0002 instead of 
the original non-compacted Data-0001) when it is started again.
Is there a way to do compaction in an atomic manner so that this doesn't happen?

As a workaround I'm currently thinking about simply deleting (or perhaps 
renaming/moving) all Data-XXXX directories but the one with the lowest index 
when the database is started.
I always use `?deleteOld=true`, so I only ever expect there to be one Data-XXXX 
directory when it starts. If there are multiple directories then that means 
that there must have been an incomplete compaction.
Does this seem like a reasonable approach?

Thanks and best regards,
Samuel

Reply via email to