librelist archives

« back to archive

About orphaned objects

About orphaned objects

From:
Petros Moisiadis
Date:
2014-03-16 @ 14:58
Today, I ran 'attic check' on attic repositories and for some of them I
got an error message like this: 'Index object count mismatch. 1191 !=
1196' (of course, numbers varied between affected repositories). Since I
already had backup copies of these repositories elsewhere, I decided to
run 'attic check --repair' for all the affected repositories to get a
message like this: "5 orphaned objects found" (again, numbers varied).
The repositories must have been repaired, because no problems are found
when running again 'attic check'. So, I have a couple of questions about
'orphan objects':
1) Are these a kind of less important problem that 'attic check
--repair' fixes in order to have a very clean repository or is it a
serious problem that could lead to data loss?
2) Which conditions can result in 'orphan objects'? (the answer to this
may also answer the first question).

BTW, I would like to suggest a minor improvement: the "5 orphaned
objects found" message should probably be enhanced with the actual
action taken by '--repair'. For example: "5 orphaned objects were found
and removed"

Re: [attic] About orphaned objects

From:
Jonas Borgström
Date:
2014-03-16 @ 20:27
On 2014-03-16 15:58, Petros Moisiadis wrote:
> Today, I ran 'attic check' on attic repositories and for some of them I
> got an error message like this: 'Index object count mismatch. 1191 !=
> 1196' (of course, numbers varied between affected repositories). Since I
> already had backup copies of these repositories elsewhere, I decided to
> run 'attic check --repair' for all the affected repositories to get a
> message like this: "5 orphaned objects found" (again, numbers varied).
> The repositories must have been repaired, because no problems are found
> when running again 'attic check'. So, I have a couple of questions about
> 'orphan objects':
> 1) Are these a kind of less important problem that 'attic check
> --repair' fixes in order to have a very clean repository or is it a
> serious problem that could lead to data loss?

"Orphaned objects found" means the the check found left over objects in
the repository that are not part of any repository. This is not a
critical problem but some disk space can be recovered by deleting them.

> 2) Which conditions can result in 'orphan objects'? (the answer to this
> may also answer the first question).

These are most likely caused by a race condition in the repository
segment compaction code I fixed in 0.11.

But to summarize: These are benign but the disk space can be reclaimed
by running "attic check --repair"

> BTW, I would like to suggest a minor improvement: the "5 orphaned
> objects found" message should probably be enhanced with the actual
> action taken by '--repair'. For example: "5 orphaned objects were found
> and removed"

Yeah, that would be more informative.

/ Jonas