You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Batyrshin Alexander <0x...@gmail.com> on 2018/10/09 09:39:13 UTC
ON DUPLICATE KEY with Global Index
Hello all,
Documentations (http://phoenix.apache.org/atomic_upsert.html) say:
"Although global indexes on columns being atomically updated are supported, it’s not recommended as a potentially a separate RPC across the wire would be made while the row is under lock to maintain the secondary index."
But in practice we get:
CANNOT_USE_ON_DUP_KEY_WITH_GLOBAL_IDX(1224, "42Z24", "The ON DUPLICATE KEY clause may not be used when a table has a global index." )
Is this bug or documentation is outdated?
Re: ON DUPLICATE KEY with Global Index
Posted by Batyrshin Alexander <0x...@gmail.com>.
Thank you. Now it's clear that documentation on web-site is outdated
> On 9 Oct 2018, at 23:12, Vincent Poon <vi...@gmail.com> wrote:
>
> We do need to update the docs after PHOENIX-3925, which changed the behavior from 'recommended' to 'mandatory'.
> I'll update the docs now.
>
> On Tue, Oct 9, 2018 at 1:08 PM Ankit Singhal <ankitsinghal59@gmail.com <ma...@gmail.com>> wrote:
> We do not allow atomic upsert and throw the corresponding exception in the cases documented under the limitations section of http://phoenix.apache.org/atomic_upsert.html <http://phoenix.apache.org/atomic_upsert.html>. Probably a documentation needs a little touch to convey this clearly.
>
> On Tue, Oct 9, 2018 at 10:05 AM Josh Elser <elserj@apache.org <ma...@apache.org>> wrote:
> Can you elaborate on what is unclear about the documentation? This
> exception and the related documentation read as being in support of each
> other to me.
>
> On 10/9/18 5:39 AM, Batyrshin Alexander wrote:
> > Hello all,
> > Documentations (http://phoenix.apache.org/atomic_upsert.html <http://phoenix.apache.org/atomic_upsert.html>) say:
> >
> > "Although global indexes on columns being atomically updated are supported, it’s not recommended as a potentially a separate RPC across the wire would be made while the row is under lock to maintain the secondary index."
> >
> > But in practice we get:
> > CANNOT_USE_ON_DUP_KEY_WITH_GLOBAL_IDX(1224, "42Z24", "The ON DUPLICATE KEY clause may not be used when a table has a global index." )
> >
> > Is this bug or documentation is outdated?
> >
Re: ON DUPLICATE KEY with Global Index
Posted by Vincent Poon <vi...@gmail.com>.
We do need to update the docs after PHOENIX-3925, which changed the
behavior from 'recommended' to 'mandatory'.
I'll update the docs now.
On Tue, Oct 9, 2018 at 1:08 PM Ankit Singhal <an...@gmail.com>
wrote:
> We do not allow atomic upsert and throw the corresponding exception in the
> cases documented under the limitations section of
> http://phoenix.apache.org/atomic_upsert.html. Probably a documentation
> needs a little touch to convey this clearly.
>
> On Tue, Oct 9, 2018 at 10:05 AM Josh Elser <el...@apache.org> wrote:
>
>> Can you elaborate on what is unclear about the documentation? This
>> exception and the related documentation read as being in support of each
>> other to me.
>>
>> On 10/9/18 5:39 AM, Batyrshin Alexander wrote:
>> > Hello all,
>> > Documentations (http://phoenix.apache.org/atomic_upsert.html) say:
>> >
>> > "Although global indexes on columns being atomically updated are
>> supported, it’s not recommended as a potentially a separate RPC across the
>> wire would be made while the row is under lock to maintain the secondary
>> index."
>> >
>> > But in practice we get:
>> > CANNOT_USE_ON_DUP_KEY_WITH_GLOBAL_IDX(1224, "42Z24", "The ON DUPLICATE
>> KEY clause may not be used when a table has a global index." )
>> >
>> > Is this bug or documentation is outdated?
>> >
>>
>
Re: ON DUPLICATE KEY with Global Index
Posted by Ankit Singhal <an...@gmail.com>.
We do not allow atomic upsert and throw the corresponding exception in the
cases documented under the limitations section of
http://phoenix.apache.org/atomic_upsert.html. Probably a documentation
needs a little touch to convey this clearly.
On Tue, Oct 9, 2018 at 10:05 AM Josh Elser <el...@apache.org> wrote:
> Can you elaborate on what is unclear about the documentation? This
> exception and the related documentation read as being in support of each
> other to me.
>
> On 10/9/18 5:39 AM, Batyrshin Alexander wrote:
> > Hello all,
> > Documentations (http://phoenix.apache.org/atomic_upsert.html) say:
> >
> > "Although global indexes on columns being atomically updated are
> supported, it’s not recommended as a potentially a separate RPC across the
> wire would be made while the row is under lock to maintain the secondary
> index."
> >
> > But in practice we get:
> > CANNOT_USE_ON_DUP_KEY_WITH_GLOBAL_IDX(1224, "42Z24", "The ON DUPLICATE
> KEY clause may not be used when a table has a global index." )
> >
> > Is this bug or documentation is outdated?
> >
>
Re: ON DUPLICATE KEY with Global Index
Posted by Josh Elser <el...@apache.org>.
Can you elaborate on what is unclear about the documentation? This
exception and the related documentation read as being in support of each
other to me.
On 10/9/18 5:39 AM, Batyrshin Alexander wrote:
> Hello all,
> Documentations (http://phoenix.apache.org/atomic_upsert.html) say:
>
> "Although global indexes on columns being atomically updated are supported, it’s not recommended as a potentially a separate RPC across the wire would be made while the row is under lock to maintain the secondary index."
>
> But in practice we get:
> CANNOT_USE_ON_DUP_KEY_WITH_GLOBAL_IDX(1224, "42Z24", "The ON DUPLICATE KEY clause may not be used when a table has a global index." )
>
> Is this bug or documentation is outdated?
>