[kepler-dev] [Bug 4225] New: - Provenance - start auto-incremented IDs at 1 not 0
bugzilla-daemon at ecoinformatics.org
bugzilla-daemon at ecoinformatics.org
Mon Jul 6 22:11:53 PDT 2009
http://bugzilla.ecoinformatics.org/show_bug.cgi?id=4225
Summary: Provenance - start auto-incremented IDs at 1 not 0
Product: Kepler
Version: 1.x dev
Platform: Other
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: provenance
AssignedTo: crawl at sdsc.edu
ReportedBy: leinfelder at nceas.ucsb.edu
QAContact: kepler-dev at kepler-project.org
I inadvertently noticed that when I queried for the last execution of a
workflow that never ran I was still getting back a valid execution id (namely
0).
The method description for resultSet.getInt(int) says that if if receives a SQL
null it will return 0. This is happening in provenance. I think the best
solution would be to start the IDs at 1 so as to never have ambiguity about
whether there is actually a result or not. The alternative is to add this to
any code that might encounter ids with value=0:
Object obj = result.getObject(1);
if (obj == null) {
return -1;
}
return result.getInt(1);
More information about the Kepler-dev
mailing list