contrib/docker/centos5
author Gregory Szorc <gregory.szorc@gmail.com>
Sat, 22 Aug 2015 18:43:24 -0700
changeset 26220 a43328baa2ac
parent 23034 eea2e0f76a24
child 33626 aa7a3f6e3729
permissions -rw-r--r--
hgweb: use separate repo instances per thread Before this change, multiple threads/requests could share a localrepository instance. This meant that all of localrepository needed to be thread safe. Many bugs have been reported telling us that localrepository isn't actually thread safe. While making localrepository thread safe is a noble cause, it is a lot of work. And there is little gain from doing so. Due to Python's GIL, only 1 thread may be processing Python code at a time. The benefits to multi-threaded servers are marginal. Thread safety would be a lot of work for little gain. So, we're not going to even attempt it. This patch establishes a pool of repos in hgweb. When a request arrives, we obtain the most recently used repository from the pool or create a new one if none is available. When the request has finished, we put that repo back in the pool. We start with a pool size of 1. For servers using a single thread, the pool will only ever be of size 1. For multi-threaded servers, the pool size will grow to the max number of simultaneous requests the server processes. No logic for pruning the pool has been implemented. We assume server operators either limit the number of threads to something they can handle or restart the Mercurial process after a certain amount of requests or time has passed.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
23034
eea2e0f76a24 docker: use official centos5 image
Mads Kiilerich <madski@unity3d.com>
parents: 22444
diff changeset
     1
FROM centos:centos5
22443
d8818616c45e docker: add CentOS 5
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     2
RUN yum install -y gcc make rpm-build gettext tar
d8818616c45e docker: add CentOS 5
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     3
RUN yum install -y python-devel python-docutils
22444
49ea49823769 dockerrpm: create a yum/dnf repo from the generated rpms
Mads Kiilerich <madski@unity3d.com>
parents: 22443
diff changeset
     4
# For creating repo meta data
49ea49823769 dockerrpm: create a yum/dnf repo from the generated rpms
Mads Kiilerich <madski@unity3d.com>
parents: 22443
diff changeset
     5
RUN yum install -y createrepo
22443
d8818616c45e docker: add CentOS 5
Mads Kiilerich <madski@unity3d.com>
parents:
diff changeset
     6
RUN yum install -y readline-devel openssl-devel ncurses-devel zlib-devel bzip2-devel