Checkout
glasser
committed
on 25 Jan 08
Use a single directory for the FSFS node origin cache instead of a
sqlite database.

Perhaps this should be sharded. (However, my only conc… Show more
Use a single directory for the FSFS node origin cache instead of a

sqlite database.

Perhaps this should be sharded.  (However, my only concern here is

"too many files in one directory", not "too many small files":

there'll only be one file here per file ever made in the repository,

so it'll take up no more space than a checkout of one branch of all

projects.)

(Technically, the node_origins table is still created in

sqlite-util.c, but that whole file is getting the wrecking ball soon.)

* subversion/include/private/svn_fs_node_origins.h

* subversion/libsvn_fs_util/node-origins-sqlite-index.c

 Delete.

* subversion/libsvn_fs_fs/fs.h

 (PATH_NODE_ORIGINS_DIR): New.

* subversion/libsvn_fs_fs/fs_fs.c

 (): Don't include svn_fs_node_origins.h

 (path_node_origins): New.

 (svn_fs_fs_hotcopy): Copy cache.

 (svn_fs_fs__commit): Call FSFS function instead of sqlite function.

 (svn_fs_fs__ensure_dir_exists): Moved from ensure_dir_exists in

  lock.c.

 (svn_fs_fs__get_node_origin, set_node_origin,

  svn_fs_fs__set_node_origins, svn_fs_fs__set_node_origin): New.

* subversion/libsvn_fs_fs/fs_fs.h

 (svn_fs_fs__get_node_origin, svn_fs_fs__set_node_origins,

  svn_fs_fs__set_node_origin): Declare.

* subversion/libsvn_fs_fs/lock.c

 (ensure_dir_exists): Move to fs_fs.c and make libsvn_fs_fs-global.

 (write_digest_file): Adjust.

* subversion/libsvn_fs_fs/structure

 Document node-origins cache.

* subversion/libsvn_fs_fs/tree.c

 (): Don't include svn_fs_node_origins.h.

 (fs_node_origin_rev): Call FSFS functions instead of sqlite

  functions.

Show less