X-Git-Url: http://git.vrable.net/?a=blobdiff_plain;f=scandir.cc;h=e4fe21fe121343c8135fe23cfedf9d858a79ef89;hb=a855c59ca566ee7a55fc3dda56ab70943a85ef32;hp=588a907e0337a774f58713a197bb43601e733507;hpb=edcae8181571b57b058cb2249cb84b01df73d52a;p=cumulus.git diff --git a/scandir.cc b/scandir.cc index 588a907..e4fe21f 100644 --- a/scandir.cc +++ b/scandir.cc @@ -200,6 +200,7 @@ int64_t dumpfile(int fd, dictionary &file_info, const string &path, // Store a copy of the object if one does not yet exist if (ref.get_segment().size() == 0) { LbsObject *o = new LbsObject; + int object_group; /* We might still have seen this checksum before, if the object * was stored at some time in the past, but we have decided to @@ -212,8 +213,15 @@ int64_t dumpfile(int fd, dictionary &file_info, const string &path, * Additionally, keep track of the age of the data by looking * up the age of the block which was expired and using that * instead of the current time. */ - if (db->IsOldObject(block_csum, bytes, &block_age)) { - o->set_group("compacted"); + if (db->IsOldObject(block_csum, bytes, + &block_age, &object_group)) { + if (object_group == 0) { + o->set_group("data"); + } else { + char group[32]; + sprintf(group, "compacted-%d", object_group); + o->set_group(group); + } if (status == NULL) status = "partial"; } else {