git-annex/doc
Joey Hess 770aac97a7
share single BranchState amoung all threads
This fixes a problem when git-annex testremote is run against a cluster
accessed via the http server. Annex.Cluster uses the location log
to find nodes that contain a key when checking if the key is present or getting
it. Just after a key was stored to a cluster node, reading the location log
was not getting the UUID of that node.

Apparently the Annex action that wrote to the location log, and the one
that read from it were run with two different Annex states. The http server
does use several different Annex threads.

BranchState was part of the AnnexState, and so two threads could have
different BranchStates.

Moved BranchState to the AnnexRead, so all threads will see the common state.

This might possibly impact performance. If one thread is writing changes to the
branch, and another thread is reading from the branch, the writing thread will
now invalidate the BranchState's cache, which will cause the reading thread to
need to do extra work. But correctness is surely more important. If did is
found to have impacted performance, it could probably be dealt with by doing
smarter BranchState cache invalidation.

Another way this might impact performance is that the BranchState has a small
cache. If several threads were reading from the branch and relying on the value
they just read still being in the case, now a cache miss will be more likely.
Increasing the BranchState cache to the number of jobs might be a good
idea to amelorate that. But the cache is currently an innefficient list,
so making it large would need changes to the data types.

(Commit 4304f1b6ae dealt with a follow-on
effect of the bug fixed here.)
2024-07-28 12:30:27 -04:00
..
Android Added a comment: git-annex for managing music 2024-07-21 19:08:45 +00:00
android
assistant
automatic_conflict_resolution
backends Added a comment: combine worm with partial hash 2024-02-01 11:53:54 +00:00
bare_repositories
bugs Propagate --force to git-annex transferrer 2024-07-23 21:16:56 -04:00
chunking
coding_style
contribute
copies
design thoughts on exporttree 2024-07-27 19:59:54 -04:00
devblog devblog 2024-05-16 13:23:36 -04:00
direct_mode
download
encryption
footer
forum Added a comment 2024-07-19 08:26:31 +00:00
future_proofing
git-annex-add
git-annex-addurl
git-annex-adjust
git-annex-benchmark
git-annex-checkpresentkey
git-annex-config
git-annex-copy
git-annex-diffdriver
git-annex-direct
git-annex-drop
git-annex-enableremote
git-annex-find
git-annex-get
git-annex-import
git-annex-importfeed
git-annex-lookupkey
git-annex-matching-options
git-annex-metadata
git-annex-move
git-annex-p2p
git-annex-preferred-content
git-annex-reinject
git-annex-repair
git-annex-rmurl
git-annex-setpresentkey
git-annex-sync
git-annex-test
git-annex-unannex
git-annex-undo
git-annex-uninit
git-annex-unlock
git-annex-unused
git-annex-webapp
git-annex-whereis promote comment to todo 2024-04-30 15:13:59 -04:00
git-annex-whereused
how_it_works
install
internals update 2024-05-28 13:36:27 -04:00
license
links move clusters page to tips 2024-06-27 15:41:38 -04:00
metadata
news add news item for git-annex 10.20240701 2024-07-02 12:31:23 -04:00
not
polls
preferred_content
profiling
projects Fix compatable typo (yet to add to codespell) 2024-05-01 15:46:25 -04:00
required_content
scalability
security
special_remotes Fix compatable typo (yet to add to codespell) 2024-05-01 15:46:25 -04:00
stickers
submodules Added a comment 2024-03-05 05:21:59 +00:00
sync Added a comment: git annex sync --ff-only 2024-07-21 01:04:44 +00:00
templates
testimonials
thanks update 2024-06-13 19:08:04 -04:00
tips add --clusterjobs option and default to 1 2024-07-28 10:36:22 -04:00
todo share single BranchState amoung all threads 2024-07-28 12:30:27 -04:00
trust
tuning Added a comment 2024-06-15 07:37:07 +00:00
upgrades
use_case
users Add link to Yann's distribits talk 2024-04-09 20:34:51 +00:00
videos add my distribits talk 2024-06-20 11:03:19 -04:00
walkthrough
workflow
Android.mdwn
assistant.mdwn
automatic_conflict_resolution.mdwn
backends.mdwn add Backend.GitRemoteAnnex 2024-05-07 13:54:08 -04:00
bare_repositories.mdwn
bugs.mdwn
builds.mdwn
chunking.mdwn
coding_style.mdwn
comments.mdwn
contact.mdwn
contribute.mdwn policy on AI generated content 2024-03-18 16:57:54 -04:00
copies.mdwn
design.mdwn
devblog.mdwn
direct_mode.mdwn
distributed_version_control.mdwn
download.mdwn
encryption.mdwn Fix compatable typo (yet to add to codespell) 2024-05-01 15:46:25 -04:00
favicon.ico
forum.mdwn
future_proofing.mdwn preparing to merge git-remote-annex 2024-05-10 15:06:15 -04:00
git-annex-add.mdwn
git-annex-addunused.mdwn
git-annex-addurl.mdwn implement URL to VURL migration 2024-03-01 16:42:02 -04:00
git-annex-adjust.mdwn
git-annex-assist.mdwn multiple -m second try 2024-04-09 12:56:47 -04:00
git-annex-assistant.mdwn
git-annex-backends.mdwn
git-annex-benchmark.mdwn
git-annex-calckey.mdwn
git-annex-checkpresentkey.mdwn
git-annex-common-options.mdwn
git-annex-config.mdwn
git-annex-configremote.mdwn
git-annex-contentlocation.mdwn
git-annex-copy.mdwn
git-annex-dead.mdwn
git-annex-describe.mdwn
git-annex-diffdriver.mdwn
git-annex-direct.mdwn
git-annex-drop.mdwn
git-annex-dropkey.mdwn
git-annex-dropunused.mdwn
git-annex-edit.mdwn
git-annex-enable-tor.mdwn
git-annex-enableremote.mdwn initremote, enableremote: Added --with-url to enable using git-remote-annex 2024-05-24 14:29:36 -04:00
git-annex-examinekey.mdwn fix typo in example 2024-03-01 15:44:46 -04:00
git-annex-expire.mdwn
git-annex-export.mdwn
git-annex-extendcluster.mdwn layout 2024-06-27 15:52:58 -04:00
git-annex-filter-branch.mdwn
git-annex-filter-process.mdwn
git-annex-find.mdwn
git-annex-findkeys.mdwn
git-annex-findref.mdwn
git-annex-fix.mdwn
git-annex-forget.mdwn
git-annex-fromkey.mdwn
git-annex-fsck.mdwn
git-annex-fuzztest.mdwn
git-annex-get.mdwn
git-annex-group.mdwn group: Added --list option 2024-05-29 13:37:35 -04:00
git-annex-groupwanted.mdwn
git-annex-import.mdwn multiple -m second try 2024-04-09 12:56:47 -04:00
git-annex-importfeed.mdwn support VURL backend 2024-02-29 13:48:51 -04:00
git-annex-indirect.mdwn
git-annex-info.mdwn
git-annex-init.mdwn
git-annex-initcluster.mdwn layout 2024-06-27 15:52:58 -04:00
git-annex-initremote.mdwn initremote, enableremote: Added --with-url to enable using git-remote-annex 2024-05-24 14:29:36 -04:00
git-annex-inprogress.mdwn
git-annex-list.mdwn
git-annex-lock.mdwn
git-annex-log.mdwn
git-annex-lookupkey.mdwn
git-annex-map.mdwn
git-annex-matchexpression.mdwn
git-annex-matching-expression.mdwn
git-annex-matching-options.mdwn
git-annex-merge.mdwn
git-annex-metadata.mdwn
git-annex-migrate.mdwn clarification 2024-03-01 17:03:40 -04:00
git-annex-mincopies.mdwn
git-annex-mirror.mdwn
git-annex-move.mdwn
git-annex-multicast.mdwn
git-annex-numcopies.mdwn
git-annex-oldkeys.mdwn
git-annex-p2p.mdwn
git-annex-p2phttp.mdwn add --clusterjobs option and default to 1 2024-07-28 10:36:22 -04:00
git-annex-post-receive.mdwn
git-annex-pre-commit.mdwn
git-annex-preferred-content.mdwn add git configs for clusters 2024-06-14 12:20:17 -04:00
git-annex-proxy.mdwn
git-annex-pull.mdwn 2024-05-02 14:32:26 +00:00
git-annex-push.mdwn fix option desc pasted from pull 2024-04-18 10:05:11 -04:00
git-annex-readpresentkey.mdwn
git-annex-registerurl.mdwn add reregisterurl command 2024-03-05 15:06:14 -04:00
git-annex-reinit.mdwn
git-annex-reinject.mdwn
git-annex-rekey.mdwn
git-annex-remotedaemon.mdwn
git-annex-renameremote.mdwn
git-annex-repair.mdwn
git-annex-required.mdwn wording 2024-06-20 10:15:24 -04:00
git-annex-reregisterurl.mdwn add reregisterurl command 2024-03-05 15:06:14 -04:00
git-annex-resolvemerge.mdwn
git-annex-restage.mdwn
git-annex-rmurl.mdwn
git-annex-satisfy.mdwn
git-annex-schedule.mdwn
git-annex-semitrust.mdwn
git-annex-setkey.mdwn
git-annex-setpresentkey.mdwn
git-annex-shell.mdwn git-annex-shell: accept uuid of remote that proxying is enabled for 2024-06-10 12:44:35 -04:00
git-annex-smudge.mdwn
git-annex-status.mdwn
git-annex-sync.mdwn multiple -m second try 2024-04-09 12:56:47 -04:00
git-annex-test.mdwn
git-annex-testremote.mdwn improve special remote docs 2024-02-05 15:48:15 -04:00
git-annex-transferkey.mdwn
git-annex-transferkeys.mdwn
git-annex-transferrer.mdwn
git-annex-trust.mdwn
git-annex-unannex.mdwn
git-annex-undo.mdwn
git-annex-ungroup.mdwn
git-annex-uninit.mdwn
git-annex-unlock.mdwn
git-annex-unregisterurl.mdwn add reregisterurl command 2024-03-05 15:06:14 -04:00
git-annex-untrust.mdwn
git-annex-unused.mdwn
git-annex-updatecluster.mdwn layout 2024-06-27 15:52:58 -04:00
git-annex-updateproxy.mdwn add --clusterjobs option and default to 1 2024-07-28 10:36:22 -04:00
git-annex-upgrade.mdwn
git-annex-vadd.mdwn
git-annex-vcycle.mdwn
git-annex-version.mdwn
git-annex-vfilter.mdwn
git-annex-vicfg.mdwn
git-annex-view.mdwn
git-annex-vpop.mdwn
git-annex-wanted.mdwn wording 2024-06-20 10:15:24 -04:00
git-annex-watch.mdwn
git-annex-webapp.mdwn webapp: Added --port option, and annex.port config 2024-01-25 14:08:36 -04:00
git-annex-whereis.mdwn
git-annex-whereused.mdwn
git-annex.mdwn annex+http urls 2024-07-23 08:42:33 -04:00
git-remote-annex.mdwn tip 2024-05-30 13:26:34 -04:00
git-remote-tor-annex.mdwn fix name of gitremote-helpers 2024-05-06 12:07:05 -04:00
git-union-merge.mdwn
how_it_works.mdwn
index.mdwn
install.mdwn
internals.mdwn implement cluster.log 2024-06-13 16:00:58 -04:00
license.mdwn
location_tracking.mdwn
logo-old-bw.svg
logo-old.png
logo-old.svg
logo-old_small.png
logo-with-cli.png Add logo version with '> git annex' text below 2024-02-22 11:17:08 -04:00
logo-with-cli.svg Add logo version with '> git annex' text below 2024-02-22 11:17:08 -04:00
logo.mdwn Add link to hellotux.com git-annex shirts 2024-03-25 06:18:36 +00:00
logo.svg
logo_16x16.png
logo_32x32.png
logo_small.png
meta.mdwn
metadata.mdwn
news.mdwn
not.mdwn
polls.mdwn
preferred_content.mdwn
privacy.mdwn remove mention of XMPP which is no longer used 2024-06-27 15:56:30 -04:00
profiling.mdwn
projects.mdwn
publicrepos.mdwn
related_software.mdwn 2024-07-16 15:42:54 +00:00
repomap.png
required_content.mdwn
scalability.mdwn
security.mdwn
shortcuts.mdwn
sidebar.mdwn
sitemap.mdwn
special_remotes.mdwn update docs for git-remote-annex 2024-05-14 15:31:16 -04:00
stickers.mdwn
submodules.mdwn
summary.mdwn
sync.mdwn
testimonials.mdwn
thanks.mdwn update thanks and separate out 2023 name list 2024-02-15 13:24:32 -04:00
tips.mdwn
todo.mdwn
transferring_data.mdwn
trust.mdwn
tuning.mdwn
upgrades.mdwn
users.mdwn
videos.mdwn
walkthrough.mdwn
workflow.mdwn