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

countPendingHints JMX operation is returning garbage for the key

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.0.12, 1.1.5
    • None
    • Low

    Description

      countPendingHints JMX operation should return a map from key: endpoint IP address to value: number of pending hints. It is returning garbage for the key (looks like binary data concerning the hint itself). The value looks correct.

      Steps to reproduce:

      1) Set up a two-node cluster.

      2) Disable gossip on the second node.

      `nodetool ring` output from node 1:

      Address DC Rack Status State Load Effective-Ownership Token
      85070591730234615865843651857942052864
      192.168.1.162 datacenter1 rack1 Up Normal 21.46 KB 100.00% 0
      192.168.1.130 datacenter1 rack1 Down Normal 6.67 KB 100.00% 85070591730234615865843651857942052864

      3) While the second node is still down, create a keyspace with RF=2 and a CF within this keyspace. Then insert two records into the CF:

      Connected to Test Cluster at 192.168.1.162:9160.
      [cqlsh 2.2.0 | Cassandra 1.1.2 | CQL spec 2.0.0 | Thrift protocol 19.32.0]
      Use HELP for help.
      cqlsh> create KEYSPACE demo WITH strategy_class = 'SimpleStrategy' AND strategy_options:replication_factor = 2;
      cqlsh> use demo;
      cqlsh:demo> create table users (username varchar primary key, password varchar);
      cqlsh:demo> insert into users (username, password) values (scott, tiger);
      cqlsh:demo> insert into users (username, password) values (root, password);

      4) Use a JMX client to execute the countPendingHints operation:

      jblangston:~ jblangston$ java -jar cmdline-jmxclient-0.10.3.jar - localhost:7199 org.apache.cassandra.db:type=HintedHandoffManager countPendingHints

      08/22/2012 14:21:37 -0500 org.archive.jmx.Client countPendingHints:

      {@B^h ?? ?[b??scottdemoscott?????password?▀×HtigerdemoF ?P?? ?[b??rootdemoroot?????password?▀×?Wpassworddemo=2}

      5) Notice the output. The value (2) is correct but the key is garbage instead of an endpoint IP address.

      Attachments

        1. 4568.txt
          0.9 kB
          Brandon Williams

        Activity

          People

            brandon.williams Brandon Williams
            jblangston@datastax.com J.B. Langston
            Brandon Williams
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: