What steps will reproduce the problem? 1. create Topic assocType with History off 2. createAssociation(assocType) 3. call revisionIndex.firstRevision.changeSet
What is the expected output? What do you see instead? A changeSet with at least the change of type "ASSOCIATION_CREATED". Instead: empty changeSet and the next revision holds the information I expected in the first (empty) one.
Comment #1
Posted on Sep 20, 2010 by Swift Lion(No comment was entered for this change.)
Comment #2
Posted on Sep 20, 2010 by Swift LioncreateAssociation(assocType) with History on, of course.
Comment #3
Posted on Sep 20, 2010 by Happy BearHi,
I write the following short test which works, as expected.
IRevisionIndex index = topicMap.getIndex(IRevisionIndex.class); index.open(); assertNull(index.getFirstRevision());
topicMap.getStore().enableRevisionManagement(false); ITopic type = createTopic(); assertNull(index.getFirstRevision());
topicMap.getStore().enableRevisionManagement(true); assertNull(index.getFirstRevision());
topicMap.createAssociation(type); assertNotNull(index.getFirstRevision()); IRevision r = index.getFirstRevision(); assertEquals(3, r.getChangeset().size());
assertNull(r.getFuture());
Can you post your code snippet which does not works as expected?
Comment #4
Posted on Sep 20, 2010 by Swift LionSorry for the Ruby Spec code.
@tm.topics.should be_empty @tm.revision_index.last_revision.should be_nil @tm.disable_revision_management @tm.get!("assoc_type") @tm.enable_revision_management @tm.revision_index.last_revision.should be_nil @tm.create_association("assoc_type") @tm.all_revisions.each do |revision| changeset = revision.changeset changeset.should_not be_empty end
all_revisions is an Array of revisions, starting with last_revision and calling past until no revision is left.
Comment #5
Posted on Sep 20, 2010 by Swift LionIf I call
first_revision = @tm.revision_index.first_revision first_revision.should_not be_nil first_revision.changeset.should_not be_empty
then the changeset of the first revision is also empty.
Comment #6
Posted on Sep 20, 2010 by Happy Bear(No comment was entered for this change.)
Comment #7
Posted on Sep 20, 2010 by Happy BearI see the problem, the bug only exists in the in-memory topic map store.
I fixed it and deploy it to maven dependency management
Status: Fixed
Labels:
Type-Defect
Priority-Medium
InMemory