[ https://issues.apache.org/jira/browse/IGNITE-7293?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16304460#comment-16304460 ]
Vladimir Ozerov commented on IGNITE-7293: ----------------------------------------- Root cause: incorrect schema ID is used by builder when no fields are set. > "BinaryObjectException: Cannot find schema for object with compact footer" > when "not null" field is defined > ----------------------------------------------------------------------------------------------------------- > > Key: IGNITE-7293 > URL: https://issues.apache.org/jira/browse/IGNITE-7293 > Project: Ignite > Issue Type: Bug > Components: binary, sql > Affects Versions: 2.3 > Reporter: Kirill Shirokov > Assignee: Vladimir Ozerov > Fix For: 2.4 > > > If the following test: > org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest#testAffinityKey > is modified by adding "not null" constraint to "age" column definition in > Person2 table: > {noformat} > execute("CREATE TABLE \"Person2\" (\"id\" int, \"city\" > varchar," + > " \"name\" varchar, \"surname\" varchar, \"age\" int not > null, PRIMARY KEY (\"id\", \"city\")) WITH " + > > "wrap_key,wrap_value,\"template=cache,affinity_key='city'\"");}} > {noformat} > The test fails with the following stack trace during INSERT operation: > {noformat} > class org.apache.ignite.binary.BinaryObjectException: Cannot find schema for > object with compact footer [typeId=-1199546406, schemaId=0] > at > org.apache.ignite.internal.binary.BinaryReaderExImpl.getOrCreateSchema(BinaryReaderExImpl.java:2020) > at > org.apache.ignite.internal.binary.BinaryObjectImpl.createSchema(BinaryObjectImpl.java:668) > at > org.apache.ignite.internal.binary.BinaryFieldImpl.fieldOrder(BinaryFieldImpl.java:284) > at > org.apache.ignite.internal.binary.BinaryFieldImpl.value(BinaryFieldImpl.java:106) > at > org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.fieldValue(QueryBinaryProperty.java:243) > at > org.apache.ignite.internal.processors.query.property.QueryBinaryProperty.value(QueryBinaryProperty.java:139) > at > org.apache.ignite.internal.processors.query.QueryTypeDescriptorImpl.validateKeyAndValue(QueryTypeDescriptorImpl.java:512) > at > org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.rowToKeyValue(DmlStatementsProcessor.java:1031) > at > org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.doInsert(DmlStatementsProcessor.java:877) > at > org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.processDmlSelectResult(DmlStatementsProcessor.java:438) > at > org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.executeUpdateStatement(DmlStatementsProcessor.java:420) > at > org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFields(DmlStatementsProcessor.java:194) > at > org.apache.ignite.internal.processors.query.h2.DmlStatementsProcessor.updateSqlFieldsDistributed(DmlStatementsProcessor.java:229) > at > org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing.queryDistributedSqlFields(IgniteH2Indexing.java:1568) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1983) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor$6.applyx(GridQueryProcessor.java:1979) > at > org.apache.ignite.internal.util.lang.IgniteOutClosureX.apply(IgniteOutClosureX.java:36) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.executeQuery(GridQueryProcessor.java:2465) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1988) > at > org.apache.ignite.internal.processors.query.GridQueryProcessor.querySqlFieldsNoCache(GridQueryProcessor.java:1944) > at > org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.checkAffinityKey(H2DynamicTableSelfTest.java:1375) > at > org.apache.ignite.internal.processors.cache.index.H2DynamicTableSelfTest.testAffinityKey(H2DynamicTableSelfTest.java:1318) > {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)