So in the present logic, *ret* is always 0 if it is not in recovery mode (and other *if* conditions are not satisfied). But when the *if* condition is satisfied, it is possible to skip the deletion of additional segments.
Considering that our goal is to always try to unlink additional segments, *ret* seems unnecessary here. The code flow looks like:
> if (isRedo || .....)
> {
> int ret; /* move to here */
> ....
> }
> else
> { }
>
> /* Delete any additional segments. */
> if (true)
> ...
Or is there any reason to allow us to skip the attempt to delete additional segments in recovery mode?