notebook publishing url collision

15 views
Skip to first unread message

Harald Schilly

unread,
Feb 7, 2012, 4:37:42 PM2/7/12
to sage-notebook
Hi, I got a report that on sagenb.org a collision between two
published notebooks had happened. The collision happened between the
users "kovzol" and "nela", whereas the first one published first and a
publishes worksheet of the second user subsequently had overwritten
the first's ones. The URLs are:
http://www.sagenb.org/home/pub/4207/ (this is in the overwritten state now)
and the one that should have actually been there is
http://www.sagenb.org/home/pub/4221/

So, apart from the observation that sagenb.org is used for more and
more serious applications, has anyone close insight in how the
published URL is generated and how the safeguards against a race
condition work? An idea of mine is, maybe it's better if instead of a
number, it could be "username-<users notebook id>" or something like
that?

greetings Harald

Andrey Novoseltsev

unread,
Feb 8, 2012, 3:35:39 PM2/8/12
to sage-notebook
On Feb 7, 2:37 pm, Harald Schilly <harald.schi...@gmail.com> wrote:
> Hi, I got a report that on sagenb.org a collision between two
> published notebooks had happened. The collision happened between the
> users "kovzol" and "nela", whereas the first one published first and a
> publishes worksheet of the second user subsequently had overwritten
> the first's ones. The URLs are:http://www.sagenb.org/home/pub/4207/(this is in the overwritten state now)
> and the one that should have actually been there ishttp://www.sagenb.org/home/pub/4221/
>
> So, apart from the observation that sagenb.org is used for more and
> more serious applications, has anyone close insight in how the
> published URL is generated and how the safeguards against a race
> condition work? An idea of mine is, maybe it's better if instead of a
> number, it could be "username-<users notebook id>" or something like
> that?

Even better would be let users enter a custom name if they want. That
does not fix racing of course, but "username-customname" also would
work fine. This way it will be possible to get some idea of what the
notebook is about just from the link. E.g. it can be "Math123-HW4".

Thank you,
Andrey

>
> greetings Harald

Jason Grout

unread,
Feb 8, 2012, 4:26:26 PM2/8/12
to sage-n...@googlegroups.com

I looked at this the other day, and my guess is that the race condition
is happening in calling sagenb/sagenb/notebook.py new_id_number function.

This reminds me of a problem I've seen only very occasionally. Has
anyone ever done "new worksheet" and gotten back not a blank worksheet,
but a worksheet they already wrote? It might be the same problem
happening above (but with the pub user instead).

Thanks,

Jason


William Stein

unread,
Feb 8, 2012, 5:56:43 PM2/8/12
to sage-n...@googlegroups.com

I used to see this all the time on sagenb.org. I don't think I've
seen it recently.

>
> Thanks,
>
> Jason
>
>

--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org

Reply all
Reply to author
Forward
0 new messages