Uploaded image for project: 'CDH (READ-ONLY)'
  1. CDH (READ-ONLY)
  2. DISTRO-836

Impala/Kudu no longer raises error on duplicate key on insert

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: CDH 5.8.3
    • Fix Version/s: None
    • Component/s: Kudu
    • Labels:
    • Environment:
      CDH5.9.0
      IMPALA_KUDU 2.7.0-3.cdh5.9.0.p0.10
      KUDU 1.1.0-1.kudu1.1.0.p0.5

      Description

      After upgrading to CDH5.9 and the version of Impala/Kudu mentioned, it seems that an error/exception is no longer raised when trying to insert a duplicate key into a Kudu table.

      For example, when using Impyla to insert a duplicate key, a Python exception used to be raised. Now no exception is raised (possibly because Impala did not return an error), and the only way to know that the record was not inserted due to duplicate key error is to read the operation log and search for "Key already present" (which you should do anyway when an exception is raised):

      cur.execute("insert into table...")
      op = cur._last_operation
      log = op.get_log() if op else ''
      print log

      > Key already present in Kudu table

      Was this an intentional change? It seems that key constraint violations are the sorts of things that should raise errors/exceptions.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              squiggly kuduser
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: