Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 01:17:12 +0530] rev 30625
py3: replace os.altsep with pycompat.altsep
All the occurences of os.altsep are replaced with pycompat.altsep which
returns bytes.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 00:52:05 +0530] rev 30624
py3: have a bytes version of sys.platform
sys.platform returns unicodes on Python 3. This patch adds up
pycompat.sysplatform which returns bytes.
Pulkit Goyal <7895pulkit@gmail.com> [Sun, 18 Dec 2016 00:44:21 +0530] rev 30623
py3: have a bytes version of os.altsep
os.altsep returns unicodes on Python 3. We need a bytes version hence added
pycompat.altsep.
Pulkit Goyal <7895pulkit@gmail.com> [Sat, 17 Dec 2016 23:55:25 +0530] rev 30622
py3: make sure encoding.encoding is a bytes variable
encoding.encoding returns unicodes when locale.getpreferredencoding() is used
to get the preferred encoding. This patch fixes that.
Jun Wu <quark@fb.com> [Mon, 19 Dec 2016 22:15:00 +0000] rev 30621
chg: remove locks
See the previous two patches for the reason. The advantage is a simplified
code base and better throughput when starting multiple servers with multiple
confighashes. The disadvantage is starting multiple servers in parallel with
a single confighash will waste some CPU time, which is probably fine in
common use-cases.
This makes it easier to switch to relative paths to support long unix domain
socket paths.
Jun Wu <quark@fb.com> [Mon, 19 Dec 2016 22:09:49 +0000] rev 30620
chg: start server at a unique address
See the previous patch for motivation. Previously, the server is started at
a globally shared address. This patch appends pid to the address so it
becomes unique.
Note: with Linux pid namespace, the address may be non-unique, but it does
not affect correctness of chg - chg client will receive an redirection and
that's it.
Jun Wu <quark@fb.com> [Mon, 19 Dec 2016 22:07:41 +0000] rev 30619
chgserver: truncate base address at "." for hash address
Previously, the hash address is just appending "-$HASH" to base address.
This patch makes it truncate the basename address at "." before appending
"-$HASH".
This makes it possible to spawn new servers in a racy situation and the
client could be sure the server it connects is the new server just spawned.
This is a step towards removing the lock.
One of the functionalities of the lock is to make sure the connect will
connect to a server it just created:
1. start server --address foo
2. connect to foo # wish "foo" is the server just started
With this change, the client could do:
1. start server --address foo.tmp$PID
2. connect to foo.tmp$PID # is the server just started
(note: if it is not, it does not affect correctness - linux pid
namespace is not a concern here)
3. rename foo.tmp$PID to foo
Another functionality of the lock is to avoid starting multiple servers with
a same confighash in parallel. But that also prevents starting multiple
servers with different confighashes in parallel.