>> Can you just close the scan if you don't need it positioned anymore? > > I'll check if that works >
The problem is that we need it re-positioned later, i.e if the user
moves to the afterLast() position and then scrolls to any other row, we
need to lock that row.
If the scan has been closed with close(), we cannot reopen it. If it has
been closed with closeForEndTransaction(.) we may reopen it, however
that would be quite undesirable, since we are not ending the
transaction, and we do not access the scancontroller from ScanManager
(which has closeForEndTransaction(.).
An alternative which I have considered is to make
ScanController.positionAtRowLocation(..) handle this by adding semantics
to the RowLocation being NULL.
I.e in HeapScan.java add this:
public boolean positionAtRowLocation(RowLocation rl) throws
StandardException {
if (rl==null)
{
positionAtDoneScan(scan_position);
return(false);
}
positionAtDoneScan will set the scan state to SCAN_DONE and release lock
as desired.
Andreas
signature.asc
Description: OpenPGP digital signature
