You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by zshamrock <al...@gmail.com> on 2017/10/22 18:05:32 UTC

Cannot find schema for object with compact footer

From time to time we get the following integration test failure (using mvn
test command). Sometimes it passes without any problems, sometime it fails,
and not necessary the same test. It never fails when running the test
standalone, i.e. from IDEA for example.

Here is the failure:

Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.418 sec
<<< FAILURE! - in SessionLineupsCacheITSpec
verify get on the existing session id returns the corresponding session
lineups(SessionLineupsCacheITSpec)  Time elapsed: 0.142 sec  <<< ERROR!
javax.cache.CacheException: class org.apache.ignite.IgniteCheckedException:
Cannot find schema for object with compact footer [typeId=709293316,
schemaId=96980434]
	at SessionLineupsCacheITSpec.verify get on the existing session id returns
the corresponding session lineups(SessionLineupsCacheITSpec.groovy:48)
Caused by: org.apache.ignite.IgniteCheckedException: Cannot find schema for
object with compact footer [typeId=709293316, schemaId=96980434]
	at SessionLineupsCacheITSpec.verify get on the existing session id returns
the corresponding session lineups(SessionLineupsCacheITSpec.groovy:48)
Caused by: org.apache.ignite.binary.BinaryObjectException: Cannot find
schema for object with compact footer [typeId=709293316, schemaId=96980434]

What does it mean "Cannot find schema for object with compact footer", and
what could be the cause of this in-consistence behavior, i.e. why it passes
sometimes, and sometimes fails?



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Cannot find schema for object with compact footer

Posted by zshamrock <al...@gmail.com>.
Yes, I suppose so, as it fails in the integration test, which uses the ignite
client, so the client node.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Cannot find schema for object with compact footer

Posted by "slava.koptilin" <sl...@gmail.com>.
Hi,

This feature relates to the underlying representation of binary objects. If
you disable the compact footer then a binary object will require a bit more
memory, but in general, this impact should not be significant, I think.

Could you please clarify where the exception is thrown? On client node?

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Cannot find schema for object with compact footer

Posted by zshamrock <al...@gmail.com>.
Slava, what is the consequence/price of disabling compact footer? Although it
looks like it only happens for the integration tests, and never (at least we
have not observed this problem) in production.

This is the test (we use Spock):

class SessionsCacheITSpec extends IgniteCacheITSpec {
    @Inject
    @Subject
    IgniteCache<String, Session> sessionsCache

    @Inject
    SessionsRepository sessionsRepository

    def "verify on the start sessionsCache cache is empty"() {
        expect:
        sessionsCache.size() == 0
    }

    def "verify get on non existent session id returns null"() {
        setup:
        def sessionId = UUID.randomUUID().toString()

        when:
        def session = sessionsCache.get(sessionId)

        then:
        session == null
    }

    def "verify get on the existing session id session is loaded from db"()
{
        setup:
        ...        
        def session = new Session(...
        )
        sessionsRepository.save(session)

        when:
        def actualSession = sessionsCache.get(sessionId)

        then:
        actualSession == session
    }
}

where IgniteCacheITSpec is the following:

@SpringApplicationConfiguration
@IntegrationTest
@DirtiesContext
class IgniteCacheITSpec extends Specification {

    @Inject
    CacheEnvironment cacheEnvironment

    @Inject
    @Qualifier("client")
    Ignite igniteClient

    @Shared
    Ignite igniteServer

    @Configuration
    @ComponentScan([...])
    static class IgniteClientConfiguration {
    }

    def setupSpec() {
        Ignition.setClientMode(false)
        igniteServer = Ignition.start(new
ClassPathResource("META-INF/grid.xml").inputStream)
    }

    def cleanupSpec() {
        def grids = Ignition.allGrids()
        // stop all clients first
        grids.findAll { it.configuration().isClientMode() } forEach {
it.close() }
        igniteServer.close()
    }
}


where the igniteClient is defined as the spring bean in one of the
configuration class, like the following:

@Bean(name = "ignite", destroyMethod = "close")
    @Qualifier("client")
    public Ignite ignite() {
        Ignition.setClientMode(true);
        return Ignition.start(igniteConfiguration());
}

Probably that could due to usage of the @DirtiesContext, although just a
guess.



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Re: Cannot find schema for object with compact footer

Posted by "slava.koptilin" <sl...@gmail.com>.
Hi,

It looks like there is an issue with the binary serialization of objects.
I would suggest the following workaround:

<property name="binaryConfiguration">
    <bean class="org.apache.ignite.configuration.BinaryConfiguration">
        <property name="compactFooter" value="false"/>
    </bean>
</property>

Could you please share the code of your test? It will be very useful in
order to understand the root cause of the issue.

By the way, could you try to reproduce the issue using the latest version of
Apache Ignite?

Thanks!



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/