[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[PATCH] next-id to next-key

From: Kamesh Jayachandran <kamesh_at_collab.net>
Date: 2006-03-02 11:16:49 CET

Hi All,
While trying to understand the bdb schema found small issues with the doc.

The attached patch fixes them.

[[[
Typo fixes to bdb repos doc on structure

Patch by: Kamesh Jayachandran <kamesh@collab.net>

* subversion/libsvn_fs_base/notes/structure
  Bdb tables nodes, transactions, copies, strings, representations use
  a record with a key 'next-key' to make use as 'key' for further
insertions.
  The doc says 'next-id' rather than 'next-key'.

]]]

With regards
Kamesh Jayachandran

Index: subversion/libsvn_fs_base/notes/structure
===================================================================
--- subversion/libsvn_fs_base/notes/structure (revision 18680)
+++ subversion/libsvn_fs_base/notes/structure (working copy)
@@ -398,7 +398,7 @@
 The database contains a table called "nodes", which is a btree indexed
 by node revision ID's, mapping them onto REPRESENTATION skels. Node 0
 is always the root directory, and node revision ID 0.0.0 is always the
-empty directory. We use the value of the key 'next-id' to indicate
+empty directory. We use the value of the key 'next-key' to indicate
 the next unused node ID.
 
 Assuming that we store the most recent revision on every branch as
@@ -487,7 +487,7 @@
      committed transactions, but it could be useful in the future.
 
 As the sole exception to the rule above, the `transactions' table
-always has one entry whose key is `next-id', and whose value is the
+always has one entry whose key is `next-key', and whose value is the
 lowest transaction ID that has never yet been used. We use this entry
 to allocate ID's for new transactions.
 
@@ -563,7 +563,7 @@
      of the copy.
 
 As the sole exception to the rule above, the `copies' table always has
-one entry whose key is `next-id', and whose value is the lowest copy ID
+one entry whose key is `next-key', and whose value is the lowest copy ID
 that has never yet been used. We use this entry to allocate new
 copy ID's.
 
@@ -834,13 +834,13 @@
 Berkeley DB tables
 ------------------
 
- "nodes" : btree(ID -> NODE-REVISION)
+ "nodes" : btree(ID -> NODE-REVISION, "next-key" -> next unused node id)
             "revisions" : recno(REVISION)
- "transactions" : btree(TXN -> TRANSACTION, "next-id" -> TXN)
+ "transactions" : btree(TXN -> TRANSACTION, "next-key" -> TXN)
               "changes" : btree(TXN -> CHANGE)
- "copies" : btree(CPY -> COPY, "next-id" -> CPY)
- "strings" : btree(STR -> STRING, "next-id" -> STR)
- "representations" : btree(REP -> REPRESENTATION, "next-id" -> REP)
+ "copies" : btree(CPY -> COPY, "next-key" -> CPY)
+ "strings" : btree(STR -> STRING, "next-key" -> STR)
+ "representations" : btree(REP -> REPRESENTATION, "next-key" -> REP)
                 "uuids" : recno(UUID)
                 "locks" : btree(TOKEN -> LOCK)
           "lock-tokens" : btree(PATH -> TOKEN)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Mar 2 11:19:25 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.