Differences between revisions 3 and 4
Revision 3 as of 2007-08-30 17:33:09
Size: 956
Editor: BrendanCully
Comment: mention possible disadvantages
Revision 4 as of 2007-08-30 19:59:59
Size: 1038
Editor: BrendanCully
Comment: inotify danger
Deletions are marked like this. Additions are marked like this.
Line 16: Line 16:
strip would have to be careful not to remove data belonging to other repositories.  * 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?

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)