subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From stef...@apache.org
Subject svn commit: r1682739 - /subversion/trunk/subversion/libsvn_fs_fs/structure-indexes
Date Sun, 31 May 2015 14:21:40 GMT
Author: stefan2
Date: Sun May 31 14:21:39 2015
New Revision: 1682739

URL: http://svn.apache.org/r1682739
Log:
Update and correct FSFS index format documentation.
No functional change.

* subversion/libsvn_fs_fs/structure-indexes
  (Design): Remove outdated comment about proto-indexes not having
            a stable format.
  (FNV checksum): Describe how exactly the partical checksums gets
                  folded into the final one and why.

Found by: danielsh

Modified:
    subversion/trunk/subversion/libsvn_fs_fs/structure-indexes

Modified: subversion/trunk/subversion/libsvn_fs_fs/structure-indexes
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/structure-indexes?rev=1682739&r1=1682738&r2=1682739&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/structure-indexes (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/structure-indexes Sun May 31 14:21:39 2015
@@ -13,10 +13,10 @@ to read and cache any data without trave
 
 Rev and pack files are immutable, so the same is true for index data.
 During a transaction or while packing a file, a proto index file gets
-written (actually, one log-to-phys and one phys-to-log).  Its format is
-a simple concatenation of runtime structs and as such, an implementation
-detail subject to change.  A proto index basically aggregates all the
-information that must later be transformed into the final index.
+written (actually, one log-to-phys and one phys-to-log).  They use a
+simpler, less compact format with fixed record lengths.  A proto index
+basically aggregates all the information that must later be transformed
+into the final index.
 
 
 General design concerns
@@ -343,10 +343,12 @@ For performance reasons we use a modifie
 
   h0 = fnv_1a([b0 b4 b8 ..]), ..., h3 = fnv_1a([b3 b7 b11 ..])
 
-* combine the big endian representation of these checksums plus the
-  remnant of the original stream into a 12 to 15 byte long intermediate
+* concatenate the big endian representation of these checksums (4 bytes
+  each) plus the remnant of the original stream into a 16 to 19 byte long
+  intermediate:
 
-  [i0 .. iK], 12 <= K+1 <= 15
+  [i0 .. iK] = [big-endian(h0) ... big-endian(h3) remnant ], 16 <= K+1 <= 19
 
-* FNV checksum = fnv_1a([i0 .. iK]) in big endian representation
+* fold the variable-length intermediate into a compact 32 bit checksum:
 
+  FNV checksum = fnv_1a([i0 .. iK])



Mime
View raw message