Commit 6a82097c authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent ea52eece
# SlapOS component for ZEO.
# https://zeo.readthedocs.io/
# XXX ZEO4 is patched
From 8b31ccec54584a287cc61501948283d7d6ee7073 Mon Sep 17 00:00:00 2001
From: Julien Muchembled <jm@nexedi.com>
Date: Mon, 26 Mar 2018 20:39:07 +0200
Subject: [PATCH] Enable TCP_NODELAY for inet(6) sockets
See commit 3d886d426243655b9f5a2528636e42b5c7662c19.
---
src/ZEO/zrpc/client.py | 2 ++
src/ZEO/zrpc/server.py | 1 +
2 files changed, 3 insertions(+)
diff --git a/src/ZEO/zrpc/client.py b/src/ZEO/zrpc/client.py
index 32a7a877..669f5962 100644
--- a/src/ZEO/zrpc/client.py
+++ b/src/ZEO/zrpc/client.py
@@ -568,6 +568,8 @@ def __init__(self, domain, addr, mgr, client):
self.close()
return
self.sock.setblocking(0)
+ if domain in (socket.AF_INET, socket.AF_INET6):
+ self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
self.state = "opened"
def connect_procedure(self):
diff --git a/src/ZEO/zrpc/server.py b/src/ZEO/zrpc/server.py
index b83cc004..af91e3e4 100644
--- a/src/ZEO/zrpc/server.py
+++ b/src/ZEO/zrpc/server.py
@@ -66,6 +66,7 @@ def _open_socket(self):
socket.IPPROTO_IPV6, socket.IPV6_V6ONLY, True)
else:
self.create_socket(socket.AF_INET, socket.SOCK_STREAM)
+ self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
else:
self.create_socket(socket.AF_UNIX, socket.SOCK_STREAM)
self.set_reuse_addr()
--
2.14.1
# SlapOS component for pygolang # SlapOS component for pygolang.
# pygolang.nexedi.com # pygolang.nexedi.com
[buildout] [buildout]
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[buildout] [buildout]
extends = extends =
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
../pytest/buildout.cfg
buildout-dev.cfg buildout-dev.cfg
parts = parts =
...@@ -48,11 +49,6 @@ workdir = ${pygolang-repository:location} ...@@ -48,11 +49,6 @@ workdir = ${pygolang-repository:location}
[versions] [versions]
pytest = 4.6.11
py = 1.9.0
pluggy = 0.13.1
pathlib2= 2.3.5
numpy = 1.16.6 numpy = 1.16.6
ipython = 5.10.0 ipython = 5.10.0
ipython-genutils = 0.2.0 ipython-genutils = 0.2.0
......
# SlapOS component for pytest.
# https://pytest.org
[pytest]
recipe = zc.recipe.egg
egg = pytest
[versions]
pytest = 4.6.11
py = 1.9.0
pluggy = 0.13.1
pathlib2= 2.3.5
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
extends = extends =
# to use versions used by ERP5 XXX -> Wendelin ? XXX -> just neoppod? # to use versions used by ERP5 XXX -> Wendelin ? XXX -> just neoppod?
../../stack/erp5/buildout.cfg ../../stack/erp5/buildout.cfg
../pytest/buildout.cfg
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
buildout.cfg buildout.cfg
...@@ -55,15 +56,11 @@ neoppod = 1.12.0 ...@@ -55,15 +56,11 @@ neoppod = 1.12.0
# XXX dup wrt pygolang/test.cfg TODO -> component/pytest/buildout.cfg # XXX dup wrt pygolang/test.cfg TODO -> component/pytest/buildout.cfg
pytest = 4.6.11
py = 1.9.0
pluggy = 0.13.1
pathlib2= 2.3.5
numpy = 1.16.6 numpy = 1.16.6
ipython = 5.10.0 ipython = 5.10.0
ipython-genutils = 0.2.0 ipython-genutils = 0.2.0
# XXX -> move component/pytest ?
wcwidth = 0.2.5 wcwidth = 0.2.5
more-itertools = 5.0.0 more-itertools = 5.0.0
importlib-metadata = 1.7.0 importlib-metadata = 1.7.0
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
[buildout] [buildout]
extends = extends =
../../stack/nxdtest.cfg ../../stack/nxdtest.cfg
../pytest/buildout.cfg
buildout-dev.cfg buildout-dev.cfg
parts = parts =
......
...@@ -110,7 +110,7 @@ eggs = ...@@ -110,7 +110,7 @@ eggs =
# to install not only wendelin.core modules but also scripts # to install not only wendelin.core modules but also scripts
wendelin.core wendelin.core
# for ZEO scripts (runzeo) # for ZEO scripts (runzeo)
ZEO ${ZEO:egg}
# for nxd/runTestSuite # for nxd/runTestSuite
erp5.util erp5.util
# for e.g. tcpu.py # for e.g. tcpu.py
......
...@@ -455,7 +455,7 @@ eggs = ${neoppod:eggs} ...@@ -455,7 +455,7 @@ eggs = ${neoppod:eggs}
# Zope acquisition patch # Zope acquisition patch
Acquisition Acquisition
# for runzeo # for runzeo
ZEO ${ZEO:egg}
# Other Zope 2 packages # Other Zope 2 packages
Products.PluggableAuthService Products.PluggableAuthService
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment