]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Change key format to preserve order of keys in backend db. 5563/head
authorVarada Kari <varada.kari@sandisk.com>
Thu, 13 Aug 2015 05:45:00 +0000 (11:15 +0530)
committerVarada Kari <varada.kari@sandisk.com>
Thu, 13 Aug 2015 05:45:00 +0000 (11:15 +0530)
Changing the key format to add additional digits to preserve the order
for the read aheads and lookups to be faster. Number of digits are
selected based on the default object size and default strip size supported
by osd.

Signed-off-by: Varada Kari <varada.kari@sandisk.com>
src/os/KeyValueStore.h

index 7220cc35013cf1e585fbf0bad68cbb407a4ed578..a93b5cf54cbd329cd6812c2ca53e744202e0a7c5 100644 (file)
@@ -220,7 +220,7 @@ class KeyValueStore : public ObjectStore,
 
   string strip_object_key(uint64_t no) {
     char n[100];
-    snprintf(n, 100, "%lld", (long long)no);
+    snprintf(n, 100, "%08lld", (long long)no);
     return string(n);
   }