Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-3528

Solr translator - batched update with more than one query gets stack

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 8.11
    • 8.7.3
    • None
    • None
    • Hide

      [1] - OK
      [2] - OK
      [3] - issue

      [1]
      Statement s = con.createStatement();
      s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(61,61)");
      s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(62,62)");
      s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(63,63)");
      s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(64,64)");
      int[] updCount = s.executeBatch();

      [2]
      PreparedStatement s = con.prepareStatement("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(?,?)");
      s.setInt(1, 61);
      s.setString(2, "61");
      s.addBatch();
      int[] updCount = s.executeBatch();

      [3]
      PreparedStatement s = con.prepareStatement("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(?,?)");
      s.setInt(1, 61);
      s.setString(2, "61");
      s.addBatch();
      s.setInt(1, 62);
      s.setString(2, "62");
      s.addBatch();
      int[] updCount = s.executeBatch();

      Show
      [1] - OK [2] - OK [3] - issue [1] Statement s = con.createStatement(); s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(61,61)"); s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(62,62)"); s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(63,63)"); s.addBatch("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(64,64)"); int[] updCount = s.executeBatch(); [2] PreparedStatement s = con.prepareStatement("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(?,?)"); s.setInt(1, 61); s.setString(2, "61"); s.addBatch(); int[] updCount = s.executeBatch(); [3] PreparedStatement s = con.prepareStatement("INSERT INTO BQT1.SmallA (IntKey,StringKey) VALUES(?,?)"); s.setInt(1, 61); s.setString(2, "61"); s.addBatch(); s.setInt(1, 62); s.setString(2, "62"); s.addBatch(); int[] updCount = s.executeBatch();

      PreparedStatement.executeBatch() with more than one query gets stack (but data are stored in Solr). For more details see server.log.
      However batch of size 1 and Statement.executeBatch() run without problems.
      The issue is not present in 6.1.1 version.

              rhn-engineering-shawkins Steven Hawkins
              jdurani Juraj Duráni (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: