cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbel...@apache.org
Subject [1/5] git commit: merge from 1.0
Date Sat, 28 Jan 2012 04:28:10 GMT
Updated Branches:
  refs/heads/cassandra-1.0 89ed0b6ec -> b10d5bd70
  refs/heads/trunk 73f7104cd -> aa20c7206


merge from 1.0


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

Branch: refs/heads/trunk
Commit: aa20c7206cdc1efc1983466de05c224eccac1084
Parents: 73f7104 b10d5bd
Author: Jonathan Ellis <jbellis@apache.org>
Authored: Fri Jan 27 22:27:49 2012 -0600
Committer: Jonathan Ellis <jbellis@apache.org>
Committed: Fri Jan 27 22:27:49 2012 -0600

----------------------------------------------------------------------
 CHANGES.txt                                        |    2 +-
 build.xml                                          |   25 ++++++++
 .../apache/cassandra/locator/TokenMetadata.java    |   41 +++++++++----
 .../apache/cassandra/service/StorageService.java   |   14 +++--
 src/java/org/apache/cassandra/utils/UUIDGen.java   |   39 +++++++++++-
 .../apache/cassandra/cql/jdbc/ClientUtilsTest.java |   48 +++++++++++++++
 6 files changed, 148 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/CHANGES.txt
----------------------------------------------------------------------
diff --cc CHANGES.txt
index 8f62ab3,db24da4..df4b030
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@@ -217,10 -154,9 +218,9 @@@ Merged from 0.8
  
  1.0.2
   * "defragment" rows for name-based queries under STCS (CASSANDRA-2503)
 - * cleanup usage of StorageService.setMode() (CASANDRA-3388)
   * Add timing information to cassandra-cli GET/SET/LIST queries (CASSANDRA-3326)
   * Only create one CompressionMetadata object per sstable (CASSANDRA-3427)
 + * cleanup usage of StorageService.setMode() (CASANDRA-3388)
-  * synchronize BiMap of bootstrapping tokens (CASSANDRA-3417)
   * Avoid large array allocation for compressed chunk offsets (CASSANDRA-3432)
   * fix DecimalType bytebuffer marshalling (CASSANDRA-3421)
   * fix bug that caused first column in per row indexes to be ignored 

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/build.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/src/java/org/apache/cassandra/locator/TokenMetadata.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/locator/TokenMetadata.java
index 6d6f009,ebb094b..bf8e190
--- a/src/java/org/apache/cassandra/locator/TokenMetadata.java
+++ b/src/java/org/apache/cassandra/locator/TokenMetadata.java
@@@ -108,10 -108,13 +108,13 @@@ public class TokenMetadat
      public int pendingRangeChanges(InetAddress source)
      {
          int n = 0;
 -        Range sourceRange = getPrimaryRangeFor(getToken(source));
 +        Range<Token> sourceRange = getPrimaryRangeFor(getToken(source));
-         for (Token token : bootstrapTokens.keySet())
-             if (sourceRange.contains(token))
-                 n++;
+         synchronized (bootstrapTokens)
+         {
+             for (Token token : bootstrapTokens.keySet())
+                 if (sourceRange.contains(token))
+                     n++;
+         }
          return n;
      }
  

http://git-wip-us.apache.org/repos/asf/cassandra/blob/aa20c720/src/java/org/apache/cassandra/service/StorageService.java
----------------------------------------------------------------------
diff --cc src/java/org/apache/cassandra/service/StorageService.java
index 975b729,9f60e58..4cf17c2
--- a/src/java/org/apache/cassandra/service/StorageService.java
+++ b/src/java/org/apache/cassandra/service/StorageService.java
@@@ -1295,14 -1252,17 +1295,16 @@@ public class StorageService implements 
  
          // For each of the bootstrapping nodes, simply add and remove them one by one to
          // allLeftMetadata and check in between what their ranges would be.
-         for (Map.Entry<Token, InetAddress> entry : bootstrapTokens.entrySet())
+         synchronized (bootstrapTokens)
          {
-             InetAddress endpoint = entry.getValue();
+             for (Map.Entry<Token, InetAddress> entry : bootstrapTokens.entrySet())
+             {
+                 InetAddress endpoint = entry.getValue();
  
-             allLeftMetadata.updateNormalToken(entry.getKey(), endpoint);
-             for (Range<Token> range : strategy.getAddressRanges(allLeftMetadata).get(endpoint))
-                 pendingRanges.put(range, endpoint);
-             allLeftMetadata.removeEndpoint(endpoint);
+                 allLeftMetadata.updateNormalToken(entry.getKey(), endpoint);
 -                for (Range range : strategy.getAddressRanges(allLeftMetadata).get(endpoint))
++                for (Range<Token> range : strategy.getAddressRanges(allLeftMetadata).get(endpoint))
+                     pendingRanges.put(range, endpoint);
+                 allLeftMetadata.removeEndpoint(endpoint);
 -            }
          }
  
          // At this stage pendingRanges has been updated according to leaving and bootstrapping
nodes.


Mime
View raw message