ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vkulichenko <valentin.kuliche...@gmail.com>
Subject Re: understanding Locks usage
Date Sat, 03 Sep 2016 03:57:21 GMT

What is your exact use case? Would transactions [1] fit it? In most cases
this is a better and easier way to manipulate the data in a concurrent and
distributed fashion. In my experience, explicit locks are needed for only
specific use cases.

Answering you questions:
1. No, it doesn't.
2. This is correct. But as I said, transactions are more natural way to do
this. I would not recommend to mix these concepts.
3. This will create three several locks. To my knowledge, you will not be
able lock on more then of them in the same thread (and it doesn't actually
make sense).
4. You should unlock the same instance of the lock that you used to lock.
5. As I said, it's not clear what's your case. The test just makes some
manipulations with locks, sometimes wrong and/or meaningless.

[1] https://apacheignite.readme.io/docs/transactions


View this message in context: http://apache-ignite-users.70518.x6.nabble.com/understanding-Locks-usage-tp7489p7506.html
Sent from the Apache Ignite Users mailing list archive at Nabble.com.

View raw message