]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Fixed regression in IndexedRelationsImpl.replace return value. 97/1297/1
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 7 Dec 2017 08:59:34 +0000 (10:59 +0200)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 7 Dec 2017 09:13:27 +0000 (12:13 +0300)
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)

bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java

index 1b4d62a1d6c6cf9c6d199b7454e713232c763526..bc9247e37818302ce53b3bdbfd5b35f9c406d21d 100644 (file)
@@ -497,7 +497,7 @@ public class IndexedRelationsImpl implements IndexedRelations {
                 // Could not write index for some reason. Ignore and let the next index query reinitialize the index.
                        return true;
                }
-            searcher.replaceIndex(progress.newChild(40), key, keyValues, relation, 1, documents);
+            didChange |= searcher.replaceIndex(progress.newChild(40), key, keyValues, relation, 1, documents);
             
         } catch (InvalidResourceReferenceException e) {
             throw new IndexException(e);