Uploaded image for project: 'Kudu'
  1. Kudu
  2. KUDU-3454

ValidateWriteOperation checks create segfault in Python client

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • client, python
    • None

    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:

                  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)
      

      e.g.: inserting, while having a auto-incrementing column specified: raises the error correctly, but in the end it segfaults:

      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
      =========================================================================================== 45 tests deselected ===========================================================================================
      ================================================================================= 1 failed, 45 deselected in 7.09 seconds =================================================================================
      Segmentation fault (core dumped)
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            mgreber Marton Greber
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: