Differences between revisions 1 and 6 (spanning 5 versions)
Revision 1 as of 2007-08-30 17:11:04
Size: 663
Editor: BrendanCully
Comment: A half-baked idea for shared repositories
Revision 6 as of 2012-05-13 14:12:19
Size: 1079
Editor: 62
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Shared repositories == <<Include(A:style)>>

<<Include(A:stub)>>

= Shared repositories =
Line 5: Line 9:
1. give revlog two opener functions, one for indices and one for data
2. the data opener opens data files and a master (shared) index file. It is used during write operations. Its linkrev field is meaningless.
3. the index opener points to the local subset of the master index. It is updated with the correct linkrev on append.
 1. give revlog two opener functions, one for indices and one for data
 2. the data opener opens data files and a master (shared) index file. It is used during write operations. Its linkrev field is meaningless.
 3. the index opener points to the local subset of the master index. It is updated with the correct linkrev on append.
Line 9: Line 13:
=== dangers === == disadvantages ==
Line 11: Line 15:
strip would have to be careful not to remove data belonging to other repositories.  * two indices need to be updated for every write. The data is small, but the seeks may not be
 * likewise, there may be seeking between the index and the data files when they aren't close together. Hopefully the index is cached when the revlog is first opened

== dangers ==

 * strip would have to be careful not to remove data belonging to other repositories.
 * inotify might be confused if store path changes after inserve has started?

{i} This page does not meet our wiki style guidelines. Please help improve this page by cleaning up its formatting.

{i} This page is an incomplete stub. Please help improve this page by expanding it, following our wiki style guidelines.

Shared repositories

It would be nice if we could share data files among multiple repositories. One way to do this would be to keep index files in the repository but have them point to a pooled data file repository.

  1. give revlog two opener functions, one for indices and one for data
  2. the data opener opens data files and a master (shared) index file. It is used during write operations. Its linkrev field is meaningless.
  3. the index opener points to the local subset of the master index. It is updated with the correct linkrev on append.

disadvantages

  • two indices need to be updated for every write. The data is small, but the seeks may not be
  • likewise, there may be seeking between the index and the data files when they aren't close together. Hopefully the index is cached when the revlog is first opened

dangers

  • strip would have to be careful not to remove data belonging to other repositories.
  • inotify might be confused if store path changes after inserve has started?

SharedRepository (last edited 2017-01-13 17:28:10 by AntonShestakov)