darcs

Issue 1556 task: safety refactor to ensure that hashed_inventory is only read once

Title task: safety refactor to ensure that hashed_inventory is only read once
Priority feature Status needs-implementation
Milestone 2.12.0 Resolved in
Superseder Nosy List darcs-devel, ganesh, kowey
Assigned To
Topics

Created on 2009-08-23.17:57:59 by kowey, last changed 2015-09-22.14:36:48 by gh.

Messages
msg8413 (view) Author: kowey Date: 2009-08-23.17:57:57
This is from David Roundy's msg5797 on issue992:

Anyhow, this should be combined with a safety refactor which would ensure that
the _darcs/hashed_inventory is only read once:  we should store its contents in
the Repository data structure, so we can't accidentally mix two views of a
remote repository during one command.  I don't think we currently make this
mistake, but it's troubling that we could.  

David goes on to comment on how this would fit into issue992:

Once this refactor is done (which
means that we'd read _darcs/hashed_inventory when first identifying the
Repository), we can easily make darcs read _darcs/inventories/xxx instead, if
the URL has some fancy format that includes a hash value.  Or if a file with
that hash isn't present in _darcs/inventories/ we'd look at
_darcs/hashed_inventory to see if that has the right hash.  This feature will
enable self-authenticating URLs, albeit URLs that only describe a specific version.
msg12472 (view) Author: kowey Date: 2010-09-06.11:47:30
Petr says this is already done as part of his adventure refactor:
http://irclog.perlgeek.de/darcs/2010-09-06#i_2790255
msg17406 (view) Author: gh Date: 2014-04-28.19:46:57
I think this was never ported from adventure to HEAD, so marking it as
"needs-implementation" again.
msg18751 (view) Author: gh Date: 2015-09-22.14:36:46
I would extend the scope of the proposal, following Petr's observations:

> But the actual motivation for that was getting rid of the tentative
files, which are superfluous and, to some extent, dangerous.
> You don't need to dump the intermediate states to disk, really.
> And they are dangerous because the API allows direct access to both
non-tentative and tentative stuff.

So the scope would be:

* always read hashed_inventory once
* never write tentative_hashed_inventory, tentative_pristine and maybe
pending.tentative, instead keep them in memory.

That would reduce Darcs' filesystem IO footprint, which is welcome
especially in cases like repositories in sshfs or dropbox.
History
Date User Action Args
2009-08-23 17:57:59koweycreate
2009-08-23 18:00:41koweylinkissue992 superseder
2009-08-25 18:16:07adminsetnosy: + darcs-devel, - simon
2009-08-27 14:30:49adminsetnosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin
2009-09-06 21:04:02koweysettopic: + Hashed
nosy: kowey, darcs-devel, thorkilnaur, dmitry.kurochkin
2010-04-03 12:06:40koweysettopic: + Library
2010-09-06 11:47:31koweysetstatus: needs-implementation -> has-patch
assignedto: mornfall
messages: + msg12472
nosy: + mornfall
2014-04-28 19:46:58ghsetstatus: has-patch -> needs-implementation
messages: + msg17406
2015-09-22 14:36:48ghsettopic: - Hashed, Library
nosy: + ganesh, - thorkilnaur, dmitry.kurochkin, mornfall
milestone: 2.12.0
messages: + msg18751
assignedto: mornfall ->