Merge branch 'cassandra-1.2' into cassandra-2.0

Conflicts:
        CHANGES.txt
        src/java/org/apache/cassandra/gms/Gossiper.java


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/0c3424e2
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/0c3424e2
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/0c3424e2

Branch: refs/heads/cassandra-2.0
Commit: 0c3424e21f907c969defbaea7b8601417fba8751
Parents: 4b8bb86 47edb3c
Author: Brandon Williams <brandonwilli...@apache.org>
Authored: Mon Jun 9 14:18:09 2014 -0500
Committer: Brandon Williams <brandonwilli...@apache.org>
Committed: Mon Jun 9 14:18:09 2014 -0500

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../gms/GossipDigestAckVerbHandler.java         |  1 -
 .../gms/GossipDigestSynVerbHandler.java         |  1 -
 src/java/org/apache/cassandra/gms/Gossiper.java | 25 ++++++++++++--------
 4 files changed, 16 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c3424e2/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 016a612,a50825f..ac95e3f
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -1,64 -1,9 +1,65 @@@
 -1.2.17
 +2.0.9
 + * Add per-CF range read request latency metrics (CASSANDRA-7338)
 + * Fix NPE in StreamTransferTask.createMessageForRetry() (CASSANDRA-7323)
 + * Add conditional CREATE/DROP USER support (CASSANDRA-7264)
 + * Swap local and global default read repair chances (CASSANDRA-7320)
 + * Add missing iso8601 patterns for date strings (CASSANDRA-6973)
 + * Support selecting multiple rows in a partition using IN (CASSANDRA-6875)
 + * cqlsh: always emphasize the partition key in DESC output (CASSANDRA-7274)
 + * Copy compaction options to make sure they are reloaded (CASSANDRA-7290)
 + * Add option to do more aggressive tombstone compactions (CASSANDRA-6563)
 + * Don't try to compact already-compacting files in HHOM (CASSANDRA-7288)
 + * Add authentication support to shuffle (CASSANDRA-6484)
 + * Cqlsh counts non-empty lines for "Blank lines" warning (CASSANDRA-7325)
 + * Make StreamSession#closeSession() idempotent (CASSANDRA-7262)
 + * Fix infinite loop on exception while streaming (CASSANDRA-7330)
 +Merged from 1.2:
+  * Check internal addresses for seeds (CASSANDRA-6523)
   * Fix potential / by 0 in HHOM page size calculation (CASSANDRA-7354)
 - * Fix handling of empty counter replication mutations (CASSANDRA-7144)
 + * Fix availability validation for LOCAL_ONE CL (CASSANDRA-7319)
   * Use LOCAL_ONE for non-superuser auth queries (CASSANDRA-7328)
 - * Set keepalive on MessagingService connections (CASSANDRA-7170)
 + * Fix handling of empty counter replication mutations (CASSANDRA-7144)
 +
 +
 +2.0.8
 + * Always reallocate buffers in HSHA (CASSANDRA-6285)
 + * (Hadoop) support authentication in CqlRecordReader (CASSANDRA-7221)
 + * (Hadoop) Close java driver Cluster in CQLRR.close (CASSANDRA-7228)
 + * Fix potential SlabAllocator yield-starvation (CASSANDRA-7133)
 + * Warn when 'USING TIMESTAMP' is used on a CAS BATCH (CASSANDRA-7067)
 + * Starting threads in OutboundTcpConnectionPool constructor causes race 
conditions (CASSANDRA-7177)
 + * return all cpu values from BackgroundActivityMonitor.readAndCompute 
(CASSANDRA-7183)
 + * fix c* launch issues on Russian os's due to output of linux 'free' cmd 
(CASSANDRA-6162)
 + * Fix disabling autocompaction (CASSANDRA-7187)
 + * Fix potential NumberFormatException when deserializing IntegerType 
(CASSANDRA-7088)
 + * cqlsh can't tab-complete disabling compaction (CASSANDRA-7185)
 + * cqlsh: Accept and execute CQL statement(s) from command-line parameter 
(CASSANDRA-7172)
 + * Fix IllegalStateException in CqlPagingRecordReader (CASSANDRA-7198)
 + * Fix the InvertedIndex trigger example (CASSANDRA-7211)
 + * Correctly delete scheduled range xfers (CASSANDRA-7143)
 + * Make batchlog replica selection rack-aware (CASSANDRA-6551)
 + * Allow overriding cassandra-rackdc.properties file (CASSANDRA-7072)
 + * Set JMX RMI port to 7199 (CASSANDRA-7087)
 + * Use LOCAL_QUORUM for data reads at LOCAL_SERIAL (CASSANDRA-6939)
 + * Log a warning for large batches (CASSANDRA-6487)
 + * Queries on compact tables can return more rows that requested 
(CASSANDRA-7052)
 + * USING TIMESTAMP for batches does not work (CASSANDRA-7053)
 + * Fix performance regression from CASSANDRA-5614 (CASSANDRA-6949)
 + * Merge groupable mutations in TriggerExecutor#execute() (CASSANDRA-7047)
 + * Fix CFMetaData#getColumnDefinitionFromColumnName() (CASSANDRA-7074)
 + * Plug holes in resource release when wiring up StreamSession 
(CASSANDRA-7073)
 + * Re-add parameter columns to tracing session (CASSANDRA-6942)
 + * Fix writetime/ttl functions for static columns (CASSANDRA-7081)
 + * Suggest CTRL-C or semicolon after three blank lines in cqlsh 
(CASSANDRA-7142)
 + * Add --resolve-ip option to 'nodetool ring' (CASSANDRA-7210)
 + * Fix duplicated error messages on directory creation error at startup 
(CASSANDRA-5818)
 + * reduce garbage on codec flag deserialization (CASSANDRA-7244) 
 + * Proper null handle for IF with map element access (CASSANDRA-7155)
 + * Improve compaction visibility (CASSANDRA-7242)
 + * Fix 2ndary index queries with DESC clustering order (CASSANDRA-6950)
 + * Invalid key cache entries on DROP (CASSANDRA-6525)
 + * Fix flapping RecoveryManagerTest (CASSANDRA-7084)
 +Merged from 1.2:
   * Add Cloudstack snitch (CASSANDRA-7147)
   * Update system.peers correctly when relocating tokens (CASSANDRA-7126)
   * Add Google Compute Engine snitch (CASSANDRA-7132)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c3424e2/src/java/org/apache/cassandra/gms/GossipDigestAckVerbHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c3424e2/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
index 337c115,f6de521..df74808
--- a/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
+++ b/src/java/org/apache/cassandra/gms/GossipDigestSynVerbHandler.java
@@@ -78,11 -78,10 +78,10 @@@ public class GossipDigestSynVerbHandle
          Gossiper.instance.examineGossiper(gDigestList, deltaGossipDigestList, 
deltaEpStateMap);
          logger.trace("sending {} digests and {} deltas", 
deltaGossipDigestList.size(), deltaEpStateMap.size());
          MessageOut<GossipDigestAck> gDigestAckMessage = new 
MessageOut<GossipDigestAck>(MessagingService.Verb.GOSSIP_DIGEST_ACK,
 -                                                                              
                        new GossipDigestAck(deltaGossipDigestList, 
deltaEpStateMap),
 -                                                                              
                        GossipDigestAck.serializer);
 +                                                                              
          new GossipDigestAck(deltaGossipDigestList, deltaEpStateMap),
 +                                                                              
          GossipDigestAck.serializer);
          if (logger.isTraceEnabled())
              logger.trace("Sending a GossipDigestAckMessage to {}", from);
-         Gossiper.instance.checkSeedContact(from);
          MessagingService.instance().sendOneWay(gDigestAckMessage, from);
      }
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/0c3424e2/src/java/org/apache/cassandra/gms/Gossiper.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/gms/Gossiper.java
index c04a87d,caadb3e..2debbd6
--- a/src/java/org/apache/cassandra/gms/Gossiper.java
+++ b/src/java/org/apache/cassandra/gms/Gossiper.java
@@@ -111,13 -104,8 +111,10 @@@ public class Gossiper implements IFailu
  
      private final Map<InetAddress, Long> expireTimeEndpointMap = new 
ConcurrentHashMap<InetAddress, Long>();
  
-     // have we ever in our lifetime reached a seed?
-     private boolean seedContacted = false;
- 
      private boolean inShadowRound = false;
  
 +    private volatile long lastProcessedMessageAt = System.currentTimeMillis();
 +
      private class GossipTask implements Runnable
      {
          public void run()
@@@ -196,20 -186,23 +193,28 @@@
          }
      }
  
 +    public void setLastProcessedMessageAt(long timeInMillis)
 +    {
 +        this.lastProcessedMessageAt = timeInMillis;
 +    }
 +
-     protected void checkSeedContact(InetAddress ep)
-     {
-         if (!seedContacted && seeds.contains(ep))
-             seedContacted = true;
-     }
- 
      public boolean seenAnySeed()
      {
-         return seedContacted;
+         for (Map.Entry<InetAddress, EndpointState> entry : 
endpointStateMap.entrySet())
+         {
+             if (seeds.contains(entry.getKey()))
+                 return true;
+             try
+             {
+                 if 
(entry.getValue().getApplicationStateMap().keySet().contains(ApplicationState.INTERNAL_IP)
 && 
seeds.contains(InetAddress.getByName(entry.getValue().getApplicationState(ApplicationState.INTERNAL_IP).value)))
+                     return true;
+             }
+             catch (UnknownHostException e)
+             {
+                 throw new RuntimeException(e);
+             }
+         }
+         return false;
      }
  
      /**

Reply via email to