From bf21555ce186b88b4d7cc8485c763a65ef5bf595 Mon Sep 17 00:00:00 2001 From: Varada Kari Date: Thu, 13 Aug 2015 11:15:00 +0530 Subject: [PATCH] Change key format to preserve order of keys in backend db. 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 --- src/os/KeyValueStore.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/os/KeyValueStore.h b/src/os/KeyValueStore.h index 7220cc35013c..a93b5cf54cbd 100644 --- a/src/os/KeyValueStore.h +++ b/src/os/KeyValueStore.h @@ -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); } -- 2.47.3