On Thursday 19 July 2007 11:26, BOLLENGIER Eric wrote: > Hi, > > > A recent "subtle" change to dird/ua_cmds.c causes at least one (possibly > > more) regression scripts to fail. I haven't checked, but I suspect that > > you made the change when you were fixing Andreas' SQL problems. > > I have just cleanup the code. > > > Basically, the change forces the Recycle Pool to be the default value as > > defined by the pool. Previously the Recycle Pool was considered something > > to be Volume dependent, and thus was not reset during normal volume > > operations (i.e. moving from pool to pool). > > RecyclePool is set in set_pool_dbr_defaults_in_media_dbr(), this function is > used when you get a volume from the scratch, or in "update volume frompool" > command. > > > The consequences of this change are if you set the Scratch volumes to > > return to the Scratch pool when they are recycled, they do not. Although I > > can see that users might want a way to force Scratch volumes to remain in > > the Pool where they are used, I don't think this will be the default. > > You can remove the "RecyclePool =" from the pool definition. > > > In any case, it breaks the current regression scripts, which count on > > Scratch volumes coming back to the Scratch pool (providing the Scratch pool > > has itself set a Recycle Pool). > > Now, my question is: was this change absolutely necessary to fix Andreas' > > problem. If so, could you explain it to me so that I understand. If not, > > do you have any objection to me putting it back. > > Yes, to resume, the bug was just a typo fix. I have remove an "UPDATE Media > set PoolId = xxx" which was already done 2 line after in a > db_update_media_record(). > > This was very important bug, because media were not updated with new pool > attributes (like retention). > > > What happens is the following: > > > > Scratch Pool > > Volume X , Recycle Pool = Scratch Pool > > > > Volume X moved to Default Pool > > Default Pool has Recycle Pool = NULL > > Volume X Recycle Pool set to NULL (previously it was unchanged) > > "Previously" means before the recyclepool patch ? or before andreas fix ?
That is a good question. I think it means before the Andreas fix, but am not sure. I would need to look back at the SVN to see whether it was you or me who added setting the RecyclePool in set_pool_dbr_defaults_in_media_dbr(). As far as I can see, that was a good change that should be left in, but it is what broke the regression scripts. I have added code to next_vol.c that resets the RecyclePoolId after the call to set_pool_dbr_defaults_in_media_dbr(), which seems to correct the problem. > > > Volume X recycled and left in Default Pool > > I think it's logical... > > RecyclePool is like other pool attributes, you can set what you want per > volume, but when it comes from the scratch, it takes attributes from the new > pool. > > If you don't use RecyclePool in your pool definition, media will not return to > the Scratch. Well, that is not how the code was working. RecyclePool was set in Scratch, but not in Default, and the media did not return to the Scratch pool. > > > > The regression script blocks because there are no more volumes in Inc pool > > and no Scratch Volumes. So with the new code, there is no way to make the > > Volume come back to the Scratch pool. > > You can add RecyclePool = Scratch in Default Pool definition. > > > With the old code, if the user set > > or left: > > > > Volume X , Recycle Pool = NULL > > > > then when it was moved to the Default Pool, it would have remained in the > > Default pool when it was recycled because a NULL Recycle Pool means to > > leave it in the same pool. > > With the new code, the user should not use this option. > Pool X, RecyclePool = NULL > > > Bye > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Bacula-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bacula-devel
