Bug #7665

Database index replace operation does not fire index query listeners

Added by Tuukka Lehtonen 11 days ago. Updated 11 days ago.

Status:ClosedStart date:2017-12-07
Priority:4Due date:2017-12-07
Assignee:Tuukka Lehtonen% Done:

100%

Category:-Spent time:-
Target version:2017-27
Release notes:Fixed database query listener firing missing problem from database index replace operation.
Tags: db, indexing, regression, 1.28.1, 1.31.0
Story points-
Velocity based estimate-
ReleaseSimantics 1.31.0Release relationshipAuto

Description

The following code in DependenciesRelation never sets didChanged to true:

                                            if (!replacementKeys.isEmpty() && (replacementKeys.size() == replacementObjects.size())) {
                                                if(DEBUG) {
                                                    System.out.println(replacementKeys.size() + " index replacements: " + replacementKeys);
                                                }
                                                didChange |= indexer.replace(null, graph, DependenciesRelation.this, resource, model, Dependencies.FIELD_RESOURCE, replacementKeys, replacementObjects);
                                            }

because IndexedRelationsImpl.replace(...) never returns true.

The bug seems to have been introduced in https://www.simantics.org/redmine/projects/simantics-platform/repository/platform-git/revisions/702195f31e8e94fc0e18172046b644723b0e9ea8.

Associated revisions

Revision 480b0e3c
Added by Tuukka Lehtonen 11 days ago

Fixed regression in IndexedRelationsImpl.replace return value.

The return value was always false which caused index query listeners to
never be fired upon index replace operations. This in turn caused
potentially invalidated query results to be returne for database
clients.

The regression was introduced in commit 702195f3 for release/1.28.0.

refs #7665

Change-Id: I9103f0fd9001ffc42f85633bc6a11d77ed863613

Revision fbb07bf9
Added by Tuukka Lehtonen 11 days ago

Fixed regression in IndexedRelationsImpl.replace return value.

The return value was always false which caused index query listeners to
never be fired upon index replace operations. This in turn caused
potentially invalidated query results to be returne for database
clients.

The regression was introduced in commit 702195f3 for release/1.28.0.

refs #7665

Change-Id: I9103f0fd9001ffc42f85633bc6a11d77ed863613
(cherry picked from commit 480b0e3c16a3958a21de00707b9957c422c21c88)

History

#1 Updated by Tuukka Lehtonen 11 days ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Release notes set to Fixed database query listener firing missing problem from database index replace operation.

#2 Updated by Tuukka Lehtonen 11 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF