From: Brian Warner Date: Wed, 13 Feb 2008 22:12:06 +0000 (-0700) Subject: 'tahoe catalog-shares': add SDMF filesize to the output, update misc/find-share-anoma... X-Git-Tag: allmydata-tahoe-0.8.0~69 X-Git-Url: https://git.rkrishnan.org/components/com_hotproperty/flags/rgr-080307.php?a=commitdiff_plain;h=41045fba0f64e59a38122b68025692fc00a66ddf;p=tahoe-lafs%2Ftahoe-lafs.git 'tahoe catalog-shares': add SDMF filesize to the output, update misc/find-share-anomalies.py to match --- diff --git a/misc/find-share-anomalies.py b/misc/find-share-anomalies.py index 5ada3ca2..f876afa0 100644 --- a/misc/find-share-anomalies.py +++ b/misc/find-share-anomalies.py @@ -19,7 +19,7 @@ for catalog in sys.argv[1:]: chk_encodings[si][0].add( (si, kN) ) chk_encodings[si][1].add( line ) if pieces[0] == "SDMF": - ftype, si, kN, ver, expiration, filename = pieces + ftype, si, kN, size, ver, expiration, filename = pieces if si not in sdmf_encodings: sdmf_encodings[si] = (set(), set()) sdmf_encodings[si][0].add( (si, kN) ) diff --git a/src/allmydata/scripts/debug.py b/src/allmydata/scripts/debug.py index 12a53441..df1d6f33 100644 --- a/src/allmydata/scripts/debug.py +++ b/src/allmydata/scripts/debug.py @@ -345,7 +345,7 @@ class CatalogSharesOptions(usage.Options): for each share it finds: CHK $SI $k/$N $filesize $UEB_hash $expiration $abspath_sharefile - SDMF $SI $k/$N $seqnum/$roothash $expiration $abspath_sharefile + SDMF $SI $k/$N $filesize $seqnum/$roothash $expiration $abspath_sharefile UNKNOWN $abspath_sharefile It may be useful to build up a catalog of shares from many storage servers @@ -401,10 +401,10 @@ def describe_share(abs_sharefile, si_s, shnum_s, now, out, err): pubkey, signature, share_hash_chain, block_hash_tree, share_data, enc_privkey) = pieces - print >>out, "SDMF %s %d/%d #%d:%s %d %s" % (si_s, k, N, seqnum, - idlib.b2a(root_hash), - expiration, - abs_sharefile) + print >>out, "SDMF %s %d/%d %d #%d:%s %d %s" % \ + (si_s, k, N, datalen, + seqnum, idlib.b2a(root_hash), + expiration, abs_sharefile) else: print >>out, "UNKNOWN mutable %s" % (abs_sharefile,)