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

possible NPE in StorageProxy?

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 0.5, 0.6
    • Component/s: None
    • Labels:
      None
    • Environment:

      all

    • Severity:
      Normal

      Description

      insert() in StorageProxy contains a logging statement that refers to a possibly un-initialized variable
      {{{
      logger.debug("insert writing key " + rm.key() + " to " + unhintedMessage.getMessageId() + "@" + hintedTarget + " for " + target);
      }}}

      this could happen if getHintedEndpointMap(rm.key(), naturalEndpoints) returns only elements for which target.equals(hintedTarget) returns false, which seems possible to me.

      Looking at the code I get the feeling the reference should probably be to 'hintedMessage', instead of "unhintedMessage", if not so an
      assert statement could be appropriate

        Attachments

        1. CASSANDRA-631-tiny.patch
          0.9 kB
          gabriele renzi
        2. CASSANDRA-631-big.patch
          4 kB
          gabriele renzi

          Activity

            People

            • Assignee:
              riffraff gabriele renzi
              Reporter:
              riffraff gabriele renzi
              Authors:
              gabriele renzi
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 10m
                10m
                Remaining:
                Remaining Estimate - 10m
                10m
                Logged:
                Time Spent - Not Specified
                Not Specified