<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -53,10 +53,6 @@ class MemcachedCount(object):
         elif incr &lt; 0:
             memcache.decr(self.key, -incr)
 
-# Naming function for shard key names in datastore and memcache
-def get_shardname(name, shard):
-    return 'Shard' + name + str(shard)
-
 class Counter(object):
     &quot;&quot;&quot;A counter using sharded writes to prevent contentions.
 
@@ -114,6 +110,7 @@ class Counter(object):
         delta = value - cur_value
         if delta != 0:
             CounterShard.increment(self, incr=delta)
+
     count = property(get_count, set_count)
 
     def increment(self, incr=1, refresh=False):
@@ -128,9 +125,9 @@ class CounterShard(db.Model):
     @classmethod
     def increment(cls, counter, incr=1):
         index = random.randint(1, Counter.NUM_SHARDS)
-        shard_key_name = get_shardname(counter.name, index)
         counter_name = counter.name
         delayed_incr = counter.delayed_incr.count
+        shard_key_name = 'Shard' + counter_name + str(index)
         def get_or_create_shard():
             shard = CounterShard.get_by_key_name(shard_key_name)
             if shard is None:</diff>
      <filename>counter.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>c5ec5d99c4c745ed2f0ced2bc0d938246a4065d0</id>
    </parent>
  </parents>
  <author>
    <name>Bill Katz</name>
    <email>billkatz@gmail.com</email>
  </author>
  <url>http://github.com/DocSavage/sharded_counter/commit/1175a75b24ba000dd249b00027d29370b1529720</url>
  <id>1175a75b24ba000dd249b00027d29370b1529720</id>
  <committed-date>2008-10-07T02:39:39-07:00</committed-date>
  <authored-date>2008-10-07T02:39:39-07:00</authored-date>
  <message>Remove unnecessary shard naming function</message>
  <tree>7668ab8b1d8c1d8c91bf575dc3a24224c7a6a5c2</tree>
  <committer>
    <name>Bill Katz</name>
    <email>billkatz@gmail.com</email>
  </committer>
</commit>
