[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug in JmdictDB interface (Was: [edict-jmdict] Policy about stars)
On 06/04/2012 06:01 PM, Jim Breen wrote:
> On 5 June 2012 06:49, Jean-Luc Léger <reiga@dspnet.fr.eu.org> wrote:
>
>> Just went back to entry 1063000 and it seems there is a bug : I don't
>> see the 2 xrefs I put, neither in the normal view nor in the edit view.
>> Obviously those xrefs are still in the database as they went to the
>> jmdict file.
>
> Thanks for raising this. I too have noticed xrefs not "taking", and I
> have gone back and repeated them. The issue has been on my
> (mental) to-do list, but I have been a bit too distracted to raise it
> with Stuart.
>
> I didn't realise that the missing xrefs were coming through in the
> XML. The "jmdict.xml" link at the bottom of the entry display shows
> no xrefs, but the daily xml download I do has:
>
> <ent_seq>1063000</ent_seq>
> <r_ele>
> <reb>シリウス</reb>
> <re_pri>gai1</re_pri>
> </r_ele>
> <info>
> <audit>
> <upd_date>2012-06-01</upd_date>
> <upd_detl>Entry created</upd_detl>
> </audit>
> <audit>
> <upd_date>2012-06-03</upd_date>
> <upd_detl>Entry amended</upd_detl>
> </audit>
> </info>
> <sense>
> <pos>&n;</pos>
> <xref>天狼星・てんろうせい</xref>
> <xref>青星・あおぼし</xref>
> <field>&astron;</field>
> <lsource xml:lang="lat"/>
> <gloss>Sirius (star in the constellation Canis Major)</gloss>
> <gloss>Alpha Canis Majoris</gloss>
> <gloss>the Dog Star</gloss>
> </sense>
> </entry>
>
> Stuart: this is from "entrs2xml.py -s jmdict --compat=jmdict".
When I check the xref table in the database now, entry 1063000
has no xrefs. There are xrefs pointing to it from three other
entries, 2629690, 2629680 and 1440510 (one from each). When I
dump 1063000 now with
./entrs2xml.py -b 1063000 -c 1 -s jmdict --compat=jmdict --nodtd
I don't see any xrefs and the xml seems to be consistent with
what the jmdictdb page shows.
<entry>
<ent_seq>1063000</ent_seq>
<r_ele>
<reb>シリウス</reb>
<re_pri>gai1</re_pri>
</r_ele>
<info>
<audit>
<upd_date>2012-06-01</upd_date>
<upd_detl>Entry created</upd_detl>
</audit>
<audit>
<upd_date>2012-06-03</upd_date>
<upd_detl>Entry amended</upd_detl>
</audit>
</info>
<sense>
<pos>&n;</pos>
<field>&astron;</field>
<lsource xml:lang="lat"/>
<gloss>Sirius (star in the constellation Canis Major)</gloss>
<gloss>Alpha Canis Majoris</gloss>
<gloss>the Dog Star</gloss>
</sense>
</entry>
Here is a timeline extracted from the diffs in the entries
2012-06-01 19:44:42 1063000 A* add xrefs to 1440510, 2629680
2012-06-03 01:18:14 1063000 A*->A no changes
2012-06-04 18:37:05 1440510 new->A add xref to 1063000
2012-06-04 19:19:16 2629680 A->A add xref to 1063000
2012-06-04 19:22:33 2629690 A->A add xref to 1063000
I wonder if this is a variant of the known problem described on
the editors list on 2011-04-26?
|> Yes, I was able to reproduce the problem. It happens when one
|> edits two entries simultaneously (in two browser pages), adds an
|> xref to the other in each then submits them both.
Not exactly the same in this case but perhaps related. I wonder if the
xrefs made it into jmdict xml because the xml generator happened to
run during the brief window while the xrefs existed?
I'll try to reproduce this case later this week -- next couple days are
full for me :-(.