[ 
https://issues.apache.org/jira/browse/KUDU-3454?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Marton Greber updated KUDU-3454:
--------------------------------
    Description: 
Checks in Status KuduSession::Data::ValidateWriteOperation on the C++ side, 
segfault in the Python client.
I noticed this while writing tests for the auto-incrementing column feature:
Repro:
{code:python}
            op = table.new_insert()
            op['key'] = 1
            op[Schema.get_auto_incrementing_column_name()] = 1
            error_msg = 'should not be specified for Insert operation'
            with self.assertRaisesRegex(KuduBadStatus, error_msg):
                session.apply(op)
{code}

e.g.: inserting, while having a auto-incrementing column specified: raises the 
error correctly, but in the end it segfaults:
{code:python}
kudu/tests/test_client.py:487: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
kudu/client.pyx:1703: in kudu.client.Session.apply
    return op.add_to_session(self)
kudu/client.pyx:3128: in kudu.client.WriteOperation.add_to_session
    check_status(s.s.get().Apply(self.op))
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   raise KuduBadStatus(status.ToString())
E   KuduBadStatus: Illegal state: Auto-Incrementing column should not be 
specified for Insert operation

kudu/errors.pyx:62: KuduBadStatus
{code}


  was:
Checks in Status KuduSession::Data::ValidateWriteOperation on the C++ side, 
segfault in the Python client.
Repro:
- inserting, while having a non-nullable column not specified: raises the error 
correctly, but in the end it segfaults

I noticed this while writing tests for the auto-incrementing column feature:

{code:python}
            op = table.new_upsert()
            op['key'] = 1
            op[Schema.get_auto_incrementing_column_name()] = 1
            with self.assertRaises(KuduBadStatus):
                session.apply(op)
{code}



> ValidateWriteOperation checks create segfault in Python client
> --------------------------------------------------------------
>
>                 Key: KUDU-3454
>                 URL: https://issues.apache.org/jira/browse/KUDU-3454
>             Project: Kudu
>          Issue Type: Bug
>          Components: client, python
>            Reporter: Marton Greber
>            Priority: Major
>
> Checks in Status KuduSession::Data::ValidateWriteOperation on the C++ side, 
> segfault in the Python client.
> I noticed this while writing tests for the auto-incrementing column feature:
> Repro:
> {code:python}
>             op = table.new_insert()
>             op['key'] = 1
>             op[Schema.get_auto_incrementing_column_name()] = 1
>             error_msg = 'should not be specified for Insert operation'
>             with self.assertRaisesRegex(KuduBadStatus, error_msg):
>                 session.apply(op)
> {code}
> e.g.: inserting, while having a auto-incrementing column specified: raises 
> the error correctly, but in the end it segfaults:
> {code:python}
> kudu/tests/test_client.py:487: 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> kudu/client.pyx:1703: in kudu.client.Session.apply
>     return op.add_to_session(self)
> kudu/client.pyx:3128: in kudu.client.WriteOperation.add_to_session
>     check_status(s.s.get().Apply(self.op))
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> >   raise KuduBadStatus(status.ToString())
> E   KuduBadStatus: Illegal state: Auto-Incrementing column should not be 
> specified for Insert operation
> kudu/errors.pyx:62: KuduBadStatus
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to