Igniters,
Do we allow to acquire explicit locks (cache.lock(..) method) within an explicit transaction? Currently it doesn't work which makes me think that it's an invalid usage, but it fails with NPE [1]. Do we need to fix it or just provide proper message? [1] https://issues.apache.org/jira/browse/IGNITE-1988 -Val |
It is currently not supported, but it should not throw an NPE. To be
honest, I am not sure why we don’t support it. IMHO, it should be analogous to a get() call which returns no value. Can anyone shed some light on this? D. On Tue, Nov 24, 2015 at 3:09 AM, Valentin Kulichenko < [hidden email]> wrote: > Igniters, > > Do we allow to acquire explicit locks (cache.lock(..) method) within an > explicit transaction? Currently it doesn't work which makes me think that > it's an invalid usage, but it fails with NPE [1]. Do we need to fix it or > just provide proper message? > > [1] https://issues.apache.org/jira/browse/IGNITE-1988 > > -Val > |
I do not think it should be analogous to "get". Get creates implicit lock
which is released when transaction ends. Lock is obtained explicitly and should be released explicitly as well. On Tue, Nov 24, 2015 at 3:34 AM, Dmitriy Setrakyan <[hidden email]> wrote: > It is currently not supported, but it should not throw an NPE. To be > honest, I am not sure why we don’t support it. IMHO, it should be analogous > to a get() call which returns no value. > > Can anyone shed some light on this? > > D. > > On Tue, Nov 24, 2015 at 3:09 AM, Valentin Kulichenko < > [hidden email]> wrote: > > > Igniters, > > > > Do we allow to acquire explicit locks (cache.lock(..) method) within an > > explicit transaction? Currently it doesn't work which makes me think that > > it's an invalid usage, but it fails with NPE [1]. Do we need to fix it or > > just provide proper message? > > > > [1] https://issues.apache.org/jira/browse/IGNITE-1988 > > > > -Val > > > |
On Tue, Nov 24, 2015 at 9:15 AM, Vladimir Ozerov <[hidden email]>
wrote: > I do not think it should be analogous to "get". Get creates implicit lock > which is released when transaction ends. Lock is obtained explicitly and > should be released explicitly as well. > Hm… I guess I didn’t think it through. I agree, then we should not support explicit locks within transactions, so no changes to current behavior. Let’s just fix the NPE then. > On Tue, Nov 24, 2015 at 3:34 AM, Dmitriy Setrakyan <[hidden email]> > wrote: > > > It is currently not supported, but it should not throw an NPE. To be > > honest, I am not sure why we don’t support it. IMHO, it should be > analogous > > to a get() call which returns no value. > > > > Can anyone shed some light on this? > > > > D. > > > > On Tue, Nov 24, 2015 at 3:09 AM, Valentin Kulichenko < > > [hidden email]> wrote: > > > > > Igniters, > > > > > > Do we allow to acquire explicit locks (cache.lock(..) method) within an > > > explicit transaction? Currently it doesn't work which makes me think > that > > > it's an invalid usage, but it fails with NPE [1]. Do we need to fix it > or > > > just provide proper message? > > > > > > [1] https://issues.apache.org/jira/browse/IGNITE-1988 > > > > > > -Val > > > > > > |
Free forum by Nabble | Edit this page |