use of org.apache.ignite.internal.pagememory.reuse.ReuseBag in project ignite-3 by apache.
the class AbstractFreeList method removeDataRowByLink.
/**
* {@inheritDoc}
*/
@Override
public void removeDataRowByLink(long link, IoStatisticsHolder statHolder) throws IgniteInternalCheckedException {
assert link != 0;
try {
long pageId = pageId(link);
int itemId = itemId(link);
ReuseBag bag = new LongListReuseBag();
long nextLink = write(pageId, rmvRow, bag, itemId, FAIL_L, statHolder);
// Can't fail here.
assert nextLink != FAIL_L;
while (nextLink != 0L) {
itemId = itemId(nextLink);
pageId = pageId(nextLink);
nextLink = write(pageId, rmvRow, bag, itemId, FAIL_L, statHolder);
// Can't fail here.
assert nextLink != FAIL_L;
}
reuseList.addForRecycle(bag);
} catch (AssertionError e) {
throw corruptedFreeListException(e);
} catch (IgniteInternalCheckedException | Error e) {
throw e;
} catch (Throwable t) {
throw new CorruptedFreeListException("Failed to remove data by link", t, grpId);
}
}
Aggregations