]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
'tahoe catalog-shares': add SDMF filesize to the output, update misc/find-share-anoma...
authorBrian Warner <warner@allmydata.com>
Wed, 13 Feb 2008 22:12:06 +0000 (15:12 -0700)
committerBrian Warner <warner@allmydata.com>
Wed, 13 Feb 2008 22:12:06 +0000 (15:12 -0700)
misc/find-share-anomalies.py
src/allmydata/scripts/debug.py

index 5ada3ca2f7e36bf4a6ccb9cf4ba34b6a0c18f2c8..f876afa0389113da411d881209bd6f6a10188ff9 100644 (file)
@@ -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) )
index 12a53441addcc4a03cb9fab0c6deaf1c2ef84173..df1d6f333483a9723a3c98f31e71dea22b3d7897 100644 (file)
@@ -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,)