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

unnecessary locking in hint path due to InetAddress.getLocalhost()

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Low
    • Resolution: Fixed
    • 1.0.1
    • None
    • None
    • Low

    Description

      in tests we found locking contention also due to the following

      Stacks at 01:49:19 PM (uptime 10:54)

      MutationStage:62 [BLOCKED] CPU time: 0:06
      java.net.InetAddress.getLocalHost()
      org.apache.cassandra.utils.UUIDGen.getClockSeqAndNode()
      org.apache.cassandra.utils.UUIDGen.createTimeUUIDBytes(long)
      org.apache.cassandra.utils.UUIDGen.getTimeUUIDBytes()
      org.apache.cassandra.db.RowMutation.hintFor(RowMutation, ByteBuffer)
      org.apache.cassandra.service.StorageProxy$4.run()
      java.lang.Thread.run()

      we can easily change every getLocalHost() call to use a cached value

      Attachments

        1. 3387.diff
          1 kB
          Yang Yang
        2. 3387_v2.diff
          0.7 kB
          Yang Yang

        Activity

          People

            yangyangyyy Yang Yang
            yangyangyyy Yang Yang
            Yang Yang
            Jonathan Ellis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: