Ticket #971 (closed defect: fixed)

Opened 5 months ago

Last modified 1 month ago

there are "note" annotations in production with state 0

Reported by: russ Assigned to: pradeep
Priority: medium Milestone: 0.9.1
Component: ambra Version: 0.9-rc2-SNAPSHOT
Keywords: Cc:
Blocking: Blocked By:

Description

we've got 12 annotations in production with state 0.

as annotations are only supposed to be in state 0 briefly, on creation, this points to some kind of bug, or transaction problem (perhaps the submission of the note failed, and mulgara failed to rollback?)

here's a list of the 12 orphaned annotations and their create dates:

itql> select $s $date from <local:///topazproject#ri> where $s $p $o and $s <mulgara:prefix> <info:doi/10.1371/annotation> in <local:///topazproject#prefix> and $s <http://rdf.topazproject.org/RDF/state> '0' and $s <http://www.w3.org/2000/10/annotation-ns#body> $body and $body <mulgara:prefix> <info:fedora> in <local:///topazproject#prefix> and $s <http://www.w3.org/2000/10/annotation-ns#created> $date;
s                                                                  date
------------------------------------------------------------------ -------------------------
<info:doi/10.1371/annotation/0b60125c-90a9-4cef-a9fe-b5221338f59b> '2008-05-27T10:18:15.273'
<info:doi/10.1371/annotation/311a7c0f-4e07-43a6-8659-de56dd7d40ea> '2008-03-20T20:48:50.403'
<info:doi/10.1371/annotation/38>                                   '2006-12-20T23:58:51Z'
<info:doi/10.1371/annotation/3c408714-4056-4db9-9600-c898ce5c0722> '2008-03-19T00:52:02.731'
<info:doi/10.1371/annotation/3dd56cea-d010-4b7e-9778-4de58237e10b> '2008-03-20T19:14:20.325'
<info:doi/10.1371/annotation/4afdea10-70c8-4c68-ada8-a7dcf33a4f50> '2008-06-10T12:22:57.102'
<info:doi/10.1371/annotation/5c1a8dfb-0e9f-4d79-ba27-59b89979a373> '2008-03-19T04:57:31.984'
<info:doi/10.1371/annotation/5e42ed00-7537-4bdb-8d52-89d4eca33c25> '2008-05-26T01:34:18.26'
<info:doi/10.1371/annotation/995b9fc6-aa6a-4841-94a0-969e468fd8dc> '2008-03-21T19:00:15.051'
<info:doi/10.1371/annotation/d7fd73fd-abd4-4868-a512-85e21fcc09be> '2008-03-20T20:52:16.318'
<info:doi/10.1371/annotation/f13d753a-b0bb-4862-ad29-147d6642a618> '2008-06-13T22:30:40.822'
<info:doi/10.1371/annotation/fed668b2-2470-4735-954e-b803f923b1d9> '2008-06-09T15:34:56.884'

Dependency Graph

Change History

06/18/08 18:01:27 changed by amit

  • owner changed from amit to russ.

Please attach the corresponding lines from the filter-resolver logs associated with these annotations from mulgara.txn.log in /var/lig/topaz. Please do not attach the complete mulgara txn log.

07/21/08 09:14:52 changed by russ

  • owner changed from russ to amit.

we don't keep a history of mulgara.txn.log. once we've backup up mulgara, we toss them.

they are enormous and would be difficult to archive.

07/26/08 22:05:42 changed by amit

  • owner changed from amit to russ.

I am not talking about the mulgara logs but the resolver file in /var/lib/topaz where we store all queries which modify data in mulgara in case data in mulgara gets corrupted to be able to clean it. Those need to be archived as we have outlined right from 0.5 release.

07/30/08 13:22:16 changed by russ

  • owner changed from russ to amit.

yup. that's the mulgara.txn.log.

my understanding was that those could be tossed after nightly backup. i'll find a strategy to start backing them up going forward.

what should be do about the annotations with state 0 in production currently?

07/30/08 13:24:13 changed by russ

  • version changed from 0.8.2.2-SNAPSHOT to 0.9-rc2-SNAPSHOT.
  • milestone set to 0.9.0.

there are now 17 of these.

here are the new ones, post 0.9 upgrade

<info:doi/10.1371/annotation/451d2402-48b1-4a34-bf7f-3e1dfede3033> '2008-07-17T20:59:48.633Z'
<info:doi/10.1371/annotation/d432a09c-5bb6-4b8e-b9fd-5ec56f16e554> '2008-07-26T18:26:30.236Z'
<info:doi/10.1371/annotation/7b8ab067-c0ea-4df1-9e98-839ee2a7034b> '2008-07-26T18:36:46.382Z'
<info:doi/10.1371/annotation/54d37df8-48cc-41eb-b04f-89052496ebf1> '2008-07-30T20:21:28.942Z'
<info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> '2008-07-30T20:21:32.688Z'

let's see if we can find anything in the txn.log for the ones from today

insert <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://purl.org/dc/terms/mediator> 'topaz-ambra' <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://rdf.topazproject.org/RDF/state> '0' <info:doi/10.1371/annotation/49967c3a-882e-48b4-b5b6-45e2fdd0db74> <http://rdf.topazproject.org/RDF/state> '1' <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/10/annotationType#Comment> <info:doi/10.1371/annotation/49967c3a-882e-48b4-b5b6-45e2fdd0db74> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/10/annotation-ns#Annotation> <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://purl.org/dc/elements/1.1/creator> 'info:doi/10.1371/account/38098' <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://www.w3.org/2000/10/annotation-ns#body> <info:fedora/PLoS:3733> <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://www.w3.org/2000/10/annotation-ns#created> '2008-07-30T20:21:32.688Z'^^<http://www.w3.org/2001/XMLSchema#dateTime> <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/10/annotation-ns#Annotation> <info:doi/10.1371/annotation/49967c3a-882e-48b4-b5b6-45e2fdd0db74> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/10/annotationType#Comment> <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://www.w3.org/2000/10/annotation-ns#annotates> <info:doi/10.1371/annotation/49967c3a-882e-48b4-b5b6-45e2fdd0db74> into <local:///topazproject#filter:model=ri>;
insert <info:doi/10.1371/annotation/669329a5-6d63-4776-a937-27b2f6a19259> <http://rdf.topazproject.org/RDF/propagate-permissions-to> <info:fedora/PLoS:3733> into <local:///topazproject#filter:model=pp>;

07/31/08 18:00:48 changed by amit

  • owner changed from amit to pradeep.

08/01/08 14:03:15 changed by pradeep

  • owner changed from pradeep to russ.

Making those two inserts from txn-log more readable:

<a:0> <topaz:state> '1'                           
<a:0> <rdf:type> <annotea:Annotation>                                                                       
<a:0> <rdf:type> <http://www.w3.org/2000/10/annotationType#Comment>

<a:1> <dc:creator> 'info:doi/10.1371/account/38098'                             
<a:1> <dcterms:mediator> 'topaz-ambra'                  
<a:1> <topaz:state> '0'                           
<a:1> <rdf:type> <http://www.w3.org/2000/10/annotation-ns#Annotation>
<a:1> <rdf:type> <http://www.w3.org/2000/10/annotationType#Comment>                                       
<a:1> <annotea:annotates> <a:0>
<a:1> <annotea:body> <info:fedora/PLoS:3733>
<a:1> <annotea:created> '2008-07-30T20:21:32.688Z'^^<http://www.w3.org/2001/XMLSchema#dateTime>

So this annotation with state '0' is really a flag. annotea:annotates is pointing to a:0. Flag annotations are not marked PUBLIC. That makes sense. Since those are meant for 'admin' to see and not for the general public.

So one thing to check is to see what the annotations in state '0' annotates. If they annotate an annotation or a reply, then you know it is a flag and can ignore it.

08/01/08 14:09:12 changed by amit

To explain a bit of history here, 'flags' were created as an annotation to maintain history as requested by PLoS. Maybe the 'flags' should have additional <rdf:type> to indicate the same.

08/01/08 14:16:12 changed by amit

*sigh* Looks like when 'flags' were created, the developers forgot to add the additional rdf:type even though it is supported by the annotation class. That is a different problem and not associated with this. So if the annotations are state '0' and are not annotating another annotation, then it might be a problem. Russ, still on your plate.

08/01/08 15:09:34 changed by russ

wonderful, i get it.

i'll confirm that these are all flags - or at least that all the newer ones are flags.

i'm pretty sure we don't have 17 pending flags, but we might have 5.

(follow-up: ↓ 13 ) 08/12/08 13:55:19 changed by russ

  • owner changed from russ to amit.

there's only one that does not annotate an annotation or a reply, and it is not recent.

itql> select $s $annotates
itql> from <local:///topazproject#ri>
itql> where $s $p $o and $s <mulgara:prefix> <info:doi/10.1371/annotation> in <local:///topazproject#prefix>
itql> and $s <http://rdf.topazproject.org/RDF/state> '0'
itql> and $s <http://www.w3.org/2000/10/annotation-ns#body> $body
itql> and $body <mulgara:prefix> <info:fedora> in <local:///topazproject#prefix>
itql> and $s <http://www.w3.org/2000/10/annotation-ns#annotates> $annotates
...
<info:doi/10.1371/annotation/995b9fc6-aa6a-4841-94a0-969e468fd8dc> <info:doi/10.1371/journal.pone.0000000>                            

is there any reason i should keep this? or should i just delete?

do replies also annotate annotations? is it possible that some of these are replies and not flags?

08/12/08 15:39:56 changed by amit

  • owner changed from amit to pradeep.

(in reply to: ↑ 11 ) 08/12/08 20:06:03 changed by pradeep

  • owner changed from pradeep to russ.

Replying to russ:

there's only one that does not annotate an annotation or a reply, and it is not recent.

...

is there any reason i should keep this? or should i just delete?

Sure. It is annotating <info:doi/10.1371/journal.pone.0000000>. What is the create date on it?

do replies also annotate annotations? is it possible that some of these are replies and not flags?

Replies are not annotations. Uses t:inReplyTo and t:root predicates to maintain the reply thread.

08/13/08 13:46:41 changed by amit

So we have an annotation on a journal article that is marked private (i.e state = 0)? What was the creation date for this?

08/13/08 13:50:07 changed by amit

  • milestone changed from 0.9.0 to 0.9.1.

08/13/08 13:50:45 changed by russ

  • owner changed from russ to pradeep.

3/21/08

it's this one from the first list:

<info:doi/10.1371/annotation/995b9fc6-aa6a-4841-94a0-969e468fd8dc> '2008-03-21T19:00:15.051'

10/24/08 12:13:38 changed by pradeep

  • status changed from new to closed.
  • resolution set to fixed.

(In [6593]) Removed the annotea:state bits usage for PUBLIC, DELETED and FLAG.

Cleaned up flag management. Closes #971, #1033.

Note that the existing annotations/replies/ratings etc. with annotea:state are untouched. New ones will have annotea:state = 0.