You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/02/16 00:35:10 UTC
[2/5] git commit: use metadata.cfId instead of re-looking it up for
each cache update
use metadata.cfId instead of re-looking it up for each cache update
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/33199c6c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/33199c6c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/33199c6c
Branch: refs/heads/cassandra-1.1
Commit: 33199c6ca21e7cceb358a971bfe047af22354768
Parents: b0c0fae
Author: Jonathan Ellis <jb...@apache.org>
Authored: Wed Feb 15 17:33:20 2012 -0600
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Wed Feb 15 17:34:10 2012 -0600
----------------------------------------------------------------------
.../org/apache/cassandra/db/ColumnFamilyStore.java | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/33199c6c/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
index e4e3204..92ae676 100644
--- a/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
+++ b/src/java/org/apache/cassandra/db/ColumnFamilyStore.java
@@ -694,11 +694,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
public void updateRowCache(DecoratedKey key, ColumnFamily columnFamily)
{
- Integer cfId = Schema.instance.getId(table.name, this.columnFamily);
- if (cfId == null)
+ if (metadata.cfId == null)
return; // secondary index
- RowCacheKey cacheKey = new RowCacheKey(cfId, key);
+ RowCacheKey cacheKey = new RowCacheKey(metadata.cfId, key);
if (CacheService.instance.rowCache.isPutCopying())
{
@@ -1480,11 +1479,10 @@ public class ColumnFamilyStore implements ColumnFamilyStoreMBean
public ColumnFamily getRawCachedRow(DecoratedKey key)
{
- Integer cfId = Schema.instance.getId(table.name, this.columnFamily);
- if (cfId == null)
+ if (metadata.cfId == null)
return null; // secondary index
- return getRawCachedRow(new RowCacheKey(cfId, key));
+ return getRawCachedRow(new RowCacheKey(metadata.cfId, key));
}
public ColumnFamily getRawCachedRow(RowCacheKey key)