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

Some client TransactionalMap operations deserializes on server side #11885

Closed
sertugkaya opened this issue Nov 28, 2017 · 1 comment · Fixed by #11953
Closed

Some client TransactionalMap operations deserializes on server side #11885

sertugkaya opened this issue Nov 28, 2017 · 1 comment · Fixed by #11953
Assignees
Labels
Milestone

Comments

@sertugkaya
Copy link
Contributor

sertugkaya commented Nov 28, 2017

While IMap#values() does not do so. This causes serialization exceptions on a client-member setup when members doesn't have the serialization info (ex: in case of using Portables).

@sertugkaya
Copy link
Contributor Author

Update: Transactional read operations also fail for objects that are written before transaction begins.

Reproducer (Foo being a Portable object):

import com.hazelcast.client.HazelcastClient;
import com.hazelcast.core.HazelcastInstance;
import com.hazelcast.core.IMap;
import com.hazelcast.core.TransactionalMap;
import com.hazelcast.transaction.TransactionContext;

/**
 * Created by sertugkaya on 19/07/16.
 */
public class DummyClient {
    public static void main(String[] args)
            throws InterruptedException {
        HazelcastInstance client = HazelcastClient.newHazelcastClient();

        IMap<Object, Object> map = client.getMap("map");

        Foo foo = new Foo();
        foo.setFoo("foo");
        map.put(1, foo);

        TransactionContext context = client.newTransactionContext();
        context.beginTransaction();
        TransactionalMap<Object, Object> map2 = context.getMap("map");
        try {
            System.out.println("foo1: " + map2.get(1));
            context.commitTransaction();
        } catch (Throwable t) {
            context.rollbackTransaction();
            t.printStackTrace();
        }
    }
}

@sertugkaya sertugkaya changed the title TransactionalMap#values() deserializes each value before returning them to the caller Some client TransactionalMap operations deserializes on server side Dec 5, 2017
sancar pushed a commit to sancar/hazelcast that referenced this issue Dec 11, 2017
Two issues found was txnMap.values and txnMap.get on an entry
put before transaction started.

Added tests for all transactional map methods.

fixes hazelcast#11885
sancar pushed a commit to sancar/hazelcast that referenced this issue Dec 11, 2017
Two issues found was txnMap.values and txnMap.get on an entry
put before transaction started.

Added tests for all transactional map methods.

fixes hazelcast#11885
sancar pushed a commit to sancar/hazelcast that referenced this issue Dec 12, 2017
Two issues found was txnMap.values and txnMap.get on an entry
put before transaction started.

Added tests for all transactional map methods.

fixes hazelcast#11885
sancar pushed a commit to sancar/hazelcast that referenced this issue Dec 12, 2017
Two issues found was txnMap.values and txnMap.get on an entry
put before transaction started.

Added tests for all transactional map methods.

fixes hazelcast#11885
sancar pushed a commit to sancar/hazelcast that referenced this issue Dec 12, 2017
Two issues found was txnMap.values and txnMap.get on an entry
put before transaction started.

Added tests for all transactional map methods.

fixes hazelcast#11885
sancar pushed a commit to sancar/hazelcast that referenced this issue Dec 12, 2017
Two issues found was txnMap.values and txnMap.get on an entry
put before transaction started.

Added tests for all transactional map methods.

fixes hazelcast#11885
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants