[OAI-implementers] new records in combination with a resumptionToken

Jozef Kruger jozef@nl.adlibsoft.com
Wed, 23 May 2001 12:06:50 +0200


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C0E370.16D3387C
Content-Type: text/plain;
	charset="iso-8859-1"

Hello everybody,
 
when implementing the resumptionToken-stuff, the following problem arose:
Our database has a function startfrom-limit(n, m) which starts at the n'th
record and get's m records.
It ignores the first (n-1) records, the records are ordered by record
number.
When ListRecords is called, I return the first 10 records in my database
(with recordnumbers 1..6, 8..11), followed by a resumptionToken.
As follows: startfrom-limit(1, 10);
The next second a record is added to the database and it get's record number
7 (the lowest free record number).
When the resumptionToken is used, I return the records 11-20 in my database,

as follows: startfrom-limit(11, 10);
but having added the record number 7, the record with record number 11 will
be return twice.
Is it necessary to explicitly avoid this behaviour? I ask this because I
think this situation is quite rare (or am I wrong?).
 
thanks in advance :)
 
cheers,
Jozef Kruger
-----------------------------------------------
Jozef Kruger, junior programmer.

    Adlib Information Systems
     www.adlibsoft.com <http://www.adlibsoft.com> 

-----------------------------------------------
 

------_=_NextPart_001_01C0E370.16D3387C
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Diso-8859-1">


<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR></HEAD>
<BODY>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>Hello =

everybody,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D710344709-23052001></SPAN></FONT>&nbsp;</DIV><FONT face=3DArial =
size=3D2><SPAN=20
class=3D710344709-23052001>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>when =
implementing=20
the resumptionToken-stuff, the following problem =
arose:</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>Our =
database has a=20
function startfrom-limit(n, m) which starts at the n'th record and =
get's m=20
records.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>It =
ignores the first=20
(n-1) records, the records are ordered by record =
number.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>When =
ListRecords is=20
called, </SPAN></FONT></SPAN></FONT><FONT face=3DArial size=3D2><SPAN=20
class=3D710344709-23052001>I return the first 10 records in my database =
(with=20
recordnumbers 1..6, 8..11), followed by a =
resumptionToken.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>As =
follows:=20
startfrom-limit(1, 10);</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>The =
next second a=20
record is added to the database and it get's record number 7 (the =
lowest free=20
record number).</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>When =
the=20
resumptionToken is used, I return the records 11-20 in my database,=20
</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>as =
follows:=20
startfrom-limit(11, 10);</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>but =
having added the=20
record number 7, the record with record number 11 will be return=20
twice.</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>Is it =
necessary to=20
explicitly avoid this behaviour? I ask this because I think this =
situation is=20
quite rare (or am I wrong?).</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D710344709-23052001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN =
class=3D710344709-23052001>thanks in advance=20
:)</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D710344709-23052001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D710344709-23052001>cheers,</SPAN></FONT></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN class=3D710344709-23052001>Jozef =

Kruger</SPAN></FONT></DIV>
<DIV><SPAN class=3D710344709-23052001>
<DIV align=3Dleft><PRE align=3D"left"><FONT face=3DArial size=3D2><SPAN =
class=3D710344709-23052001>---------------------------------------------=
--<BR></SPAN></FONT><FONT face=3DArial size=3D2>Jozef Kruger, junior =
programmer.
    Adlib Information Systems<BR><SPAN class=3D710344709-23052001>    =
<A href=3D"http://www.adlibsoft.com">www.adlibsoft.com</A></SPAN>
-----------------------------------------------</FONT></PRE></DIV></SPAN=
></DIV>
<DIV><FONT face=3DArial size=3D2><SPAN=20
class=3D710344709-23052001></SPAN></FONT>&nbsp;</DIV></BODY></HTML>

------_=_NextPart_001_01C0E370.16D3387C--