Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-18215

Fix the output of FQL dump tool to properly separate entries

    XMLWordPrintableJSON

Details

    • Code
    • Low
    • Low Hanging Fruit
    • Adhoc Test
    • All
    • None
    • 4.0
    • Hide

      Manually verified the output. Mentioned output before and after this change in the pull request.

      Show
      Manually verified the output. Mentioned output before and after this change in the pull request.

    Description

      This was reported in (1)

      (1) https://github.com/apache/cassandra/pull/2050

      If I create a table something like this:

      CREATE TABLE t1 ( id int PRIMARY KEY , v1 int, v2 int, v3 int) ;
      

      and inserted a row using:

      try (CqlSession cqlSession = CqlSession.builder().build()) {
          PreparedStatement preparedStatement = cqlSession.prepare("INSERT INTO ks1.t1 (id, v1, v2, v3) VALUES (?, ?, ?, ?)");
          cqlSession.execute(preparedStatement.bind(1, 1, 1, 1));
      }
      

      The output of fqltool looks something like this:

      Type: single-query
      Query start time: 1673373829119
      Protocol version: 5
      Generated timestamp:-9223372036854775808
      Generated nowInSeconds:1673373829
      Query: INSERT INTO ks1.t1 (id, v1, v2, v3) VALUES (?, ?, ?, ?)
      Values: 
      00000000 00 00 00 01                                      ····             
      00000000 00 00 00 01                                      ····             
      -----
      00000000 00 00 00 01                                      ····             
      -----
      00000000 00 00 00 01                                      ····             
      -----
      

      ----- is not printed between the first and second value

      Values: 
      00000000 00 00 00 01                                      ····             
      00000000 00 00 00 01                                      ····   
      

      We are normally very cautious about changing the output of the tooling but in this case I think this is a legit bug which should be fixed.

      Attachments

        Activity

          People

            n.v.harikrishna n.v.harikrishna
            smiklosovic Stefan Miklosovic
            n.v.harikrishna
            Brandon Williams, Stefan Miklosovic
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: