From: <sju...@ko...> - 2006-04-07 21:09:11
|
I did the same: Updated to revision 3065. Then compiled and started exist - still the same problem. It should =20 be mentioned that the test query manages to do one update in each =20 document before it crashes. Also, since I have EXIST_HOME pointing to =20= my 20060313 version, it used the data dir found there. The only modifications I have done to eXist is adding a project =20 specific Cocoon action, a couple of changes to the webapp sitemap, =20 and a few tweaks to conf.xml. I would be happy if more people could =20 run the test, to either repeat the bug or tell me that I'm insane;-) Sjur Den 7. apr. 2006 kl. 17.19 skrev Giulio Valentino: > Hi Sjur, > I made your test on a fresh svn version > and cause no problem with a response from gui after some iteration =20 > like > > <test>31</test> > <test>32</test> > <test>33</test> > <test>34</test> > <test>35</test> > <test>36</test> > <test>37</test> > <test>38</test> > <test>39</test> > <test>40</test> > > > > Giulio > > XP, Java 1.5_06 > > > 2006/4/7, Sjur N=F8rsteb=F8 Moshagen <sju...@ko...>: >> declare namespace util=3D"http://exist-db.org/xquery/util"; >> >> declare function local:update() as element()* >> { >> let $maxId :=3D max(for $i in //node/@id return xs:integer($i)) + 1 >> >> let $r :=3D >> update insert >> <node id=3D"{$maxId}">appended node - sjur A</node> >> into doc('/db/C1/test.xml')/root >> >> (: This second update crashes eXist - leave it out, and all goes =20 >> well, >> include it, and eXist must be restarted to get back to normal: :) >> let $s :=3D >> update insert >> <node id=3D"{$maxId}">appended node - sjur B</node> >> into doc('/db/C1/test2.xml')/root >> >> return >> <test> >> {$maxId} >> </test> >> }; >> >> for $i in (1,2,3,4,5,6,7,8,9,10) >> let $doc :=3D (doc('/db/C1/test.xml'),doc('/db/C1/test2.xml')) >> let $j :=3D util:exclusive-lock($doc,local:update() ) >> return $j >> >> The error is now very different from last time I tried this, and I >> crash well before I enter the locking issue. Basically I am not able >> to update two documents at the same time (from within the same >> function), let alone do that concurrently from two different >> requests. If I update only one document (see comment within XQuery), >> all goes well. The two-doc update version triggers a >> NullPointerException, stacktrace attached below. |