junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

ddsnap server auto deletes the newest created snapshot when we hit 64 snapshot limit #80

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
There is a problem in ddsnap auto_delete code when we hit the 64 snapshot
number limit. I.e., when we get to the 64 snapshot limit and a new snapshot
creation request comes in, ddsnap scans the snapshot list and selects the
first found snapshot with smallest usecount/priority in find_victim().
ddsnap automatically deletes that snapshot and the new snapshot takes that
snapshot slot. The problem is when the next snapshot creations request
comes, ddsnap  server will do the same thing again, which means the
snapshot it just created will be automatically deleted. Maybe we should
take into account snapshot ages in find_victim() as well to fix this problem.  

Original issue reported on code.google.com by jiahotc...@gmail.com on 21 Feb 2008 at 1:26

GoogleCodeExporter commented 9 years ago
Sounds like something we need to fix for this release.

Original comment by daniel.r...@gmail.com on 26 Feb 2008 at 12:50

GoogleCodeExporter commented 9 years ago
I took a closer look at the code. Actually, ddsnapd does select the oldest 
snapshot
for auto delete. The problem was caused by a bug introduced in revision 1319 (a 
bug
in my patch :P) that did not update snapshots variable after calling
auto_delete_snapshot function. It is now fixed with revision 1429.

Original comment by jiahotc...@gmail.com on 6 Mar 2008 at 12:23