Bug #5668

CaseInsensitiveComponentFunctionNamingStrategy uses getRelatedValue where it should be using getPossibleRelatedValue

Added by Tuukka Lehtonen over 2 years ago. Updated about 2 years ago.

Status:ClosedStart date:2015-02-15
Priority:4Due date:2015-03-02
Assignee:Tuukka Lehtonen% Done:

100%

Category:-Spent time:-
Target version:1.18.1
Release notes:Fixed CaseInsensitiveComponentFunctionNamingStrategy to not throw unexpected exceptions whilst looking for L0.HasName properties from index results. The indexing system can't currently guarantee that the results gotten directly from the index are 100% up-to-date with the current database contents and therefore all results must be handled as if they might no longer exist.
Story points-
Velocity based estimate-
ReleaseSimantics 1.18.1Release relationshipAuto

Description

2015-02-13 13:43:33,460 177679583 [ Query Thread 0] ERROR ics.db.common.utils.LogManager - Write transaction caused an unexpected error, see exception.
org.simantics.db.exception.NoSingleResultException: Subject: $6052570:$6052570, Relation: HasName:$4101
    at org.simantics.db.impl.graph.ReadGraphImpl.getRelatedValue(ReadGraphImpl.java:1155)
    at org.simantics.modeling.services.CaseInsensitiveComponentFunctionNamingStrategy.validateInstanceName(CaseInsensitiveComponentFunctionNamingStrategy.java:202)
    at org.simantics.modeling.services.ComponentNamingStrategyBase.validateInstanceName(ComponentNamingStrategyBase.java:94)
    at org.simantics.modeling.services.ComponentNamingStrategyBase.findFreshInstanceName(ComponentNamingStrategyBase.java:88)
    at org.simantics.modeling.services.ComponentNamingUtil.findFreshInstanceName(ComponentNamingUtil.java:86)
    at org.simantics.modeling.mapping.NamingCreationInstruction.create(NamingCreationInstruction.java:51)
    at org.simantics.mapping.constraint.instructions.TypedBracketInstruction$Claim.perform(TypedBracketInstruction.java:66)
    at org.simantics.mapping.constraint.instructions.CombinedInstruction$CompositeClaim.perform(CombinedInstruction.java:41)
    at org.simantics.mapping.rule.instructions.ClaimRuleInstruction$1.perform(ClaimRuleInstruction.java:50)
    at org.simantics.mapping.rule.instructions.AndRuleInstruction$1.perform(AndRuleInstruction.java:48)
    at org.simantics.mapping.rule.instructions.QueryRuleInstruction.doExecute(QueryRuleInstruction.java:125)
    at org.simantics.mapping.rule.instructions.IfRuleInstruction.doExecute(IfRuleInstruction.java:91)
    at org.simantics.mapping.rule.instructions.AndRuleInstruction$1.perform(AndRuleInstruction.java:50)
    at org.simantics.db.services.activation.ActivationManager$Activation$1.perform(ActivationManager.java:121)
    at fi.vtt.simantics.procore.internal.SessionImplSocket$1.run(SessionImplSocket.java:506)
    at fi.vtt.simantics.procore.internal.SessionRequestManager$3.run(SessionRequestManager.java:185)
    at org.simantics.db.impl.query.QueryThread.run(QueryThread.java:251)

Associated revisions

Revision 30926
Added by Tuukka Lehtonen over 2 years ago

Use getPossibleRelatedValue instead of getRelatedValue in code that already checks whether getRelatedValue returns null or not.
It never returns null and the code is clearly intended to handle null results.

refs #5668

Revision 30927
Added by Tuukka Lehtonen over 2 years ago

Merged trunk@30926 to branches/simantics-1.18 on 2015-02-15 for 1.18.1 release.

refs #5668

Revision 30966
Added by Tuukka Lehtonen over 2 years ago

Final getRelatedValue -> getPossibleRelatedValue fix for CaseInsensitiveComponentFunctionNamingStrategy.

refs #5668

Revision 30967
Added by Tuukka Lehtonen over 2 years ago

Merged trunk@30966 to branches/simantics-1.18 on 2015-02-23 for 1.18.1 release.

refs #5668

Revision 32948
Added by Tuukka Lehtonen 11 months ago

(refs #5668) Fixed SpreadsheetTable/TextTableCellEditor to not start editing when user presses ESC or any other "action key" besides F2 which normally starts editing in most software.

History

#1 Updated by Tuukka Lehtonen over 2 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

#2 Updated by Tuukka Lehtonen over 2 years ago

  • Release notes set to Fixed CaseInsensitiveComponentFunctionNamingStrategy to not throw unexpected exceptions whilst looking for L0.HasName properties from index results. The indexing system can't currently guarantee that the results gotten directly from the index are 100% up-to-date with the current database contents and therefore all results must be handled as if they might no longer exist.

#3 Updated by Tuukka Lehtonen about 2 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF