Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't do nested queries on VersionedPortables with different versions. Hazelcast throws IllegalArgumentException: Not a registered Portable field #8846

Closed
andrianmarinov opened this issue Sep 5, 2016 · 0 comments

Comments

Projects
None yet
3 participants
@andrianmarinov
Copy link

commented Sep 5, 2016

Given an object that looks like this:

public class TestObjectPortable implements VersionedPortable {
    private TestObjectMetadataPortable objectMetadataPortable;

    public TestObjectPortable(TestObjectMetadataPortable objectMetadata) {
        this.objectMetadataPortable = objectMetadata;
    }

    public int getClassVersion() {
        return 3;
    }
    ...

and the metadata object:

public class TestObjectMetadataPortable implements VersionedPortable {
    String metaData;
    String reference;

    public TestObjectMetadataPortable(String metaData, String reference) {
        this.metaData = metaData;
        this.reference = reference;
    }

    public int getClassVersion() { return 1; }
    ...

If I try to do the following query:

map.values(Predicates.equal("objectMetadataPortable.reference", "ref2"));

Hazelcast would throw an IllegalArgumentException: Not a registered Portable field.

However if I change the class version of TestObjectMetadataPortable to 3 as well everything works as expected.

Project to proof the issue:
HazelCastBug.zip

@andrianmarinov andrianmarinov changed the title Can't do nested queries on VersionedPortables with different versions Can't do nested queries on VersionedPortables with different versions. Hazelcast throws java.lang.IllegalArgumentException: Not a registered Portable field Sep 14, 2016

@andrianmarinov andrianmarinov changed the title Can't do nested queries on VersionedPortables with different versions. Hazelcast throws java.lang.IllegalArgumentException: Not a registered Portable field Can't do nested queries on VersionedPortables with different versions. Hazelcast throws IllegalArgumentException: Not a registered Portable field Sep 14, 2016

@jerrinot jerrinot added this to the 3.8 milestone Oct 19, 2016

@tombujok tombujok self-assigned this Dec 7, 2016

tombujok added a commit to tombujok/hazelcast that referenced this issue Dec 9, 2016

tombujok added a commit to tombujok/hazelcast that referenced this issue Dec 9, 2016

tombujok added a commit that referenced this issue Dec 20, 2016

Fixes nested queries on VersionedPortables with different versions. (#…
…9415)

* Fixes nested queries on VersionedPortables with different versions. Fixes #8846

* Test for nested queries on versioned portables
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.