From: Tuukka Lehtonen Date: Thu, 7 Dec 2017 08:59:34 +0000 (+0200) Subject: Fixed regression in IndexedRelationsImpl.replace return value. X-Git-Tag: v1.31.0~2 X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F96%2F1296%2F1;p=simantics%2Fplatform.git 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 --- diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java index 1b4d62a1d..bc9247e37 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsImpl.java @@ -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);