From d1c1f3eb9098e74e9483609ff4f90e8de83c4016 Mon Sep 17 00:00:00 2001 From: Loic Dachary Date: Fri, 27 Sep 2013 19:09:23 +0200 Subject: [PATCH] common: document ghobject sort order rationale Intuition differs regarding the sort order of the ghobject shard and generation. Document the rationale for the chosen sort order. Reviewed-by: Samuel Just Reviewed-by: David Zafman Signed-off-by: Loic Dachary --- src/common/hobject.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/common/hobject.h b/src/common/hobject.h index 46fc67b893a4..82eecf3bfc7b 100644 --- a/src/common/hobject.h +++ b/src/common/hobject.h @@ -288,8 +288,12 @@ namespace __gnu_cxx { ostream& operator<<(ostream& out, const ghobject_t& o); -WRITE_EQ_OPERATORS_3(ghobject_t, hobj, generation, shard_id) -// sort ghobject_t's by +WRITE_EQ_OPERATORS_3(ghobject_t, hobj, shard_id, generation) +// sort ghobject_t's by +// +// Two objects which differ by generation are more related than +// two objects of the same generation which differ by shard. +// WRITE_CMP_OPERATORS_3(ghobject_t, hobj, shard_id, -- 2.47.3