Commit Graph

169 Commits

Author SHA1 Message Date
Valentin Bartenev
beb4de21bb Removed NXT_PACKED from port structures.
That was added only to silence Valgrind, but it results in
unaligned access (which breaks Unit on ARM architecture).
2017-07-18 17:12:46 +03:00
Max Romanov
6b6fefa497 Request-app link introduced to prevent mp destroy for penging requests.
nxt_req_conn_link_t still used for lookup connection by request id.
New nxt_req_app_link_t (ra) allocated from conn->mem_pool using mp_retain().
ra stored in app->requests if there is no free worker to process request.
2017-07-18 00:21:28 +03:00
Max Romanov
31e5992f88 Using correct task for engine post. 2017-07-18 00:21:18 +03:00
Max Romanov
8ad2c3fd3a Work queue thread assertions. Reset thread after fork. 2017-07-18 00:21:17 +03:00
Max Romanov
803855138c Mem pool cleanup introduced.
Used for connection mem pool cleanup, which can be used by buffers.
Used for port mem pool to safely destroy linked process.
2017-07-18 00:21:16 +03:00
Max Romanov
eb675f2d78 Port allocation and destroy changed. Worker process stop introduced. 2017-07-18 00:21:14 +03:00
Max Romanov
47b359388c Python: typo fixed in string processing shortcut. 2017-07-18 00:21:13 +03:00
Igor Sysoev
dbe6862395 Fixed building by Clang. 2017-07-16 19:56:59 +03:00
Igor Sysoev
6fc7b70646 Router configuration retention count fixed. 2017-07-16 19:56:09 +03:00
Igor Sysoev
6044e6f44f Router: joint must be added to engine's joint list in the
engine thread.
2017-07-16 19:55:56 +03:00
Ruslan Ermilov
ca3b1b898a Restored arc4random unit test after 59fc46dd5e1d. 2017-07-14 20:37:28 +03:00
Igor Sysoev
e134efcb9c Thread pools: various fixes. 2017-07-14 20:34:43 +03:00
Igor Sysoev
b3464d563e Router: joint must be checked before memory pool destruction. 2017-07-14 20:34:38 +03:00
Igor Sysoev
b5d0920491 Router: listening socket configuration retention count fixed. 2017-07-14 20:34:33 +03:00
Igor Sysoev
3ed35d725a Router: using joint job queues instead of arrays to pass
listening socket handlers to worker engines.
2017-07-14 17:17:15 +03:00
Igor Sysoev
668aabac3c Router: using joint jobs to pass listening socket handlers to
worker engines.
2017-07-14 17:17:15 +03:00
Valentin Bartenev
d669045b75 Fixed the previous commit. 2017-07-14 17:03:01 +03:00
Valentin Bartenev
a937047cb8 Null-terminated user and group. 2017-07-14 16:08:21 +03:00
Igor Sysoev
daaa216e2f Using correct task for connection initialization. 2017-07-13 22:44:46 +03:00
Igor Sysoev
c5d791d0c4 Router: restoring listening sockets of the previous configuration. 2017-07-13 16:48:28 +03:00
Igor Sysoev
0324d51b8d Closing new listening sockets on configuration failure. 2017-07-12 21:21:00 +03:00
Valentin Bartenev
2be31e2ed6 Fixed style and building with NXT_DEBUG_MEMORY after 3578a7b7ace4. 2017-07-12 20:57:18 +03:00
Max Romanov
288fa85431 Array elements reallocation fixed. 2017-07-12 20:32:22 +03:00
Max Romanov
48afadfe7c Memory pool debug enabled with NXT_DEBUG_ALLOC define. 2017-07-12 20:32:20 +03:00
Max Romanov
7d3fd1c96c Single allocation for app conf and name. 2017-07-12 20:32:19 +03:00
Max Romanov
a97a5e8a0b Go: worker initialization. READY message to master. 2017-07-12 20:32:18 +03:00
Max Romanov
51bbdd3338 PHP SAPI: dynamic worker initialization. 2017-07-12 20:32:17 +03:00
Max Romanov
b0c1e740cf New process port exchange changed. READY message type introduced.
Application process start request DATA message from router to master.
Master notifies router via NEW_PORT message after worker process become ready.
2017-07-12 20:32:16 +03:00
Valentin Bartenev
c38bcb7d70 Controller: proper reconfiguration requests handling.
Now controller serializes all reconfiguration requests
and waits for result from router.
2017-07-12 20:21:17 +03:00
Igor Sysoev
4f4061061b Sending a result of configuration applying back to the controller. 2017-07-11 20:14:50 +03:00
Igor Sysoev
3bccb7f358 Introducing thread-safe nxt_random(). 2017-07-10 21:07:12 +03:00
Valentin Bartenev
dc874cd22e Configuration: improved validation. 2017-07-10 18:53:36 +03:00
Valentin Bartenev
eb4c2e4a21 Configuration: nxt_conf_map_object() improvements. 2017-07-10 17:55:51 +03:00
Valentin Bartenev
c0674de78d Controller: passing full configuration to router. 2017-07-10 17:55:44 +03:00
Igor Sysoev
aaf9378dcc Router: a fix in the previous changeset. 2017-07-07 21:20:29 +03:00
Igor Sysoev
b54bcef53d Router: processing application configuration. 2017-07-07 21:09:45 +03:00
Valentin Bartenev
fd0a4ff064 Configuration: basic schema validation for applications. 2017-07-07 20:37:43 +03:00
Max Romanov
e41425bb1f Router: connection destroy sequence fixed. 2017-07-07 18:16:14 +03:00
Valentin Bartenev
fc9f73bbea Controller: relaxed JSON parser.
Now it allows commas after the last elements in objects and arrays,
as it's a common Igor's mistake.
2017-07-07 18:09:15 +03:00
Max Romanov
9a402ea83d Taken counter initialized for new pages.
Fixed crash in nxt_mp_get() when pages re-used and 'taken' contains initial
'map' value '0xFFFFFFFF'.
2017-07-07 16:01:34 +03:00
Max Romanov
e58f4ef0d0 Memory pool thread safety checks in DEBUG build and usage fixes. 2017-07-07 16:01:34 +03:00
Max Romanov
e15b975e9d Work queue thread safety checks for DEBUG build. 2017-07-07 16:01:34 +03:00
Max Romanov
5529e9f0d1 Python initialization moved from master to worker application. 2017-07-07 16:01:34 +03:00
Max Romanov
74cda90e31 Process stop notification from master to all other processes.
New port message type introduced NXT_PORT_MSG_REMOVE_PID. Default handler
removes process description from nxt_runtime_t with all ports, incoming and
outgoing mmaps etc.
2017-07-07 16:01:34 +03:00
Max Romanov
61008a7c0b Cosmetic changes to remove some annoying valgrind messages. 2017-07-07 16:01:34 +03:00
Max Romanov
264ae98d49 Using engine's task instead of listen's task. 2017-07-07 16:01:34 +03:00
Max Romanov
f319220a6c Redirecting buffer completion handler to specific engine.
There is a case in router where we use port in router connection thread.
Buffers are allocated within connection memory pool which can be used only in
this router thread. sendmsg() can be postponed into main router thread and
completion handler will compare current engine and post itself to correct
engine.
2017-07-07 16:01:34 +03:00
Valentin Bartenev
c9fbd832ab Controller: sending JSON configuration to router. 2017-07-06 22:52:05 +03:00
Valentin Bartenev
22d73057d9 Fixed mapping of int32_t in nxt_conf_map_object(). 2017-07-06 22:50:38 +03:00
Max Romanov
c56d2af3bc Router: read configuration from port.
Controller: stub to send configuration from POST body "as is" to router.
2017-07-06 18:38:51 +03:00