Hi everybody, I'm facing a very strange issue with the recordstore, and wanted to check if anybody else had found it as well.
The code adds a bunch of records to various recordstores, one after the other, and everything goes well most of the time, however, upon having added more than 1,000 records total, and more than 100 on the current Recordstore, a "trash" record is read by the RecordData filter.
...Previous records added here...
Code:
System.err.println(sItemID + "--" + sName);
int recdebgid = oPst.addOrReplaceItem(Integer.parseInt(sItemID), sName);
try{
System.err.println(String.valueOf(recdebgid) + "++" + String.valueOf(oPst.theRecordStore.getVersion()));}
catch (Exception oEx) {System.err.println(oEx.toString());}
//DEBUG
if (itemName.equalsIgnoreCase("class") & sName.equalsIgnoreCase("rkvone"))
{
ItemList aDebugList = oPst.getItemsList();
aDebugList = null;
} In the above code, if we examine the values in recdebgid and theRecordStore.getVersion(), we'll see that everything is correct, with records being inserted well, and the version being incremented as expected; this is also true, upon reaching record 120 in the current recordstore; howver, if at this point we traverse the complete record list on the current recordstore, task done by the function getItemsList(), we get a non-existent record returned.
Then, if our original list looks like this:
ItemID 81 Value "rkv1"
ItemId 82 Value "rkvone"
ItemID 83 Value "rkvone:rkv1"
Upon reading all records we get:
ItemID 81 Value "rkv1"
ItemID 1298998373 Value "u000 u000 u000 R"
ItemId 82 Value "rkvone"
Now, if this were inserted by my code, the recordstore version and nextrecordID would reveal it, but they don't. Hence I belive this is a bug in the recordfilter function, which somehow is including that non-existent record into the result set.
So, have you seen this happen as well?
Thanks,
Sergio Flores
IHG Studios