Julian Foad wrote:
> Bert and I were just discussing the checksums in PRISTINE. We think its
> primary key should be SHA-1 always. A secondary index can be built on
> the MD5 column if required.
> 
> Can we patch the docco like this?

+1

There was agreement on always using SHA1 hashes in the 'pristine store
design' thread. See where Greg says "nono" in
http://mail-archives.apache.org/mod_mbox/subversion-dev/201002.mbox/%3c6cca3db31002171652u15ae7e87ha5b09e4cb170a...@mail.gmail.com%3e

The possibility of using MD5 to index was also named in that thread, but did
not resonate well.

~Neels

> 
> [[[
> * subversion/libsvn_wc/wc-metadata.sql
>   (PRISTINE): Define "checksum" as always being SHA-1.
>     Document the uniqueness properties of both checksum fields.
>     Document when "md5_checksum" can be null.
> ]]]
> 
> [[[
> Index: subversion/libsvn_wc/wc-metadata.sql
> ===================================================================
> --- subversion/libsvn_wc/wc-metadata.sql      (revision 911752)
> +++ subversion/libsvn_wc/wc-metadata.sql      (working copy)
> @@ -172,7 +172,9 @@
>     and ACTUAL_NODE tables.
>   */
>  CREATE TABLE PRISTINE (
> -  /* ### the hash algorithm (MD5 or SHA-1) is encoded in this value */
> +  /* The SHA-1 checksum of the pristine text. This is a unique key. The
> +     SHA-1 checksum of a pristine text is assumed to be unique among all
> +     pristine texts referenced from this database. */
>    checksum  TEXT NOT NULL PRIMARY KEY,
>  
>    /* ### enumerated values specifying type of compression. NULL implies
> @@ -189,7 +191,8 @@
>    refcount  INTEGER NOT NULL,
>  
>    /* Alternative MD5 checksum used for communicating with older
> -     repositories. */
> +     repositories. Not guaranteed to be unique among table rows.
> +     NULL if not (yet) calculated. */
>    md5_checksum  TEXT
>    );
> ]]]
> 
> - Julian
> 
> 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to