Commit Graph

2157 Commits

Author SHA1 Message Date
Andrey Zelenkov 7ae5bef233 Tests: check_modules() function introduced. 2017-12-06 15:35:28 +03:00
Andrey Zelenkov 79b1d4f5ff Tests: port range changed to 7xxx. 2017-12-06 15:34:58 +03:00
Andrey Zelenkov 078d44ea71 Tests: removed extra parameter from range() call. 2017-12-06 15:34:06 +03:00
Andrey Zelenkov 487253754c Tests: waitforfiles() optimization. 2017-12-06 15:33:45 +03:00
Andrey Zelenkov 782fa1118d Tests: don't exceed 79 characters. 2017-12-06 15:32:09 +03:00
Max Romanov d14c0774c7 Go: removing request registry.
Passing unsafe.Pointers (void *) from Go to C is complicated by an attempt
to make such pointers less unsafe.

A straightforward optimization is to replace 'unsafe.Pointer' with 'uintptr'
(thanks to Xin Huang for the idea: https://stackoverflow.com/a/44826533 ).

As a result, request registry with mutex is gone.
2017-12-06 12:16:02 +03:00
Max Romanov 0db4d25316 Fixing Go package build in NetBSD.
Bug introduced in 585c8068a6d7.
2017-12-05 17:06:37 +03:00
Max Romanov cdf900cf2c Packaging changes for updated Go package.
- package name changed to 'nginx/unit';
- source files installed in /usr/share/gocode;
- rpm and deb go packages made noarch.
2017-12-01 16:59:41 +03:00
Max Romanov 40eb1f8b9b Making Go package source distributable and renaming to 'nginx/unit'.
All header files are copied to Go package sources.  As the result,
package can be (re-)build when required.

This closes #23 issue on GitHub.
2017-12-01 16:57:30 +03:00
Max Romanov ffb1c68609 Initializing port_msg fields with zeroes in Go package. 2017-12-01 16:51:30 +03:00
Max Romanov 630ec3f1ec Using compiler capability to generate dependencies.
This closes #58 issue on GitHub.
2017-12-01 16:28:06 +03:00
Max Romanov 1add36a7ee Using --ld-opt when linking modules. 2017-11-29 18:49:08 +03:00
Max Romanov 3781950bad Introducing python virtualenv configuration.
New parameter 'home' for python application allows to configure
application-specific virtualenv path.

This closes #15 issue on GitHub.
2017-11-29 18:48:55 +03:00
Andrey Zelenkov ec4ad8780e Tests: "verbose" mode introduced. 2017-11-29 15:23:22 +03:00
Andrey Zelenkov 75198f82b1 Tests: waitforfiles function introduced. 2017-11-29 15:23:09 +03:00
Andrey Zelenkov 4d772a9cd0 Tests: fixed port number in test_basic.t. 2017-11-28 21:59:31 +03:00
Andrey Zelenkov cf09ca655a Tests: changed shebang to the default. 2017-11-28 16:06:14 +03:00
Max Romanov ec411569e7 Fixing build on Solaris. 2017-11-02 15:32:46 +03:00
Igor Sysoev eb5c49ead9 Timer should be marked as it is not in tree after deletion.
This closes #64 issue on GitHub.
2017-11-27 18:50:31 +03:00
Igor Sysoev 40160621a9 Removed uncontext.h.
This removal was missed the changeset 2aad6a5fac13.
2017-11-27 18:50:18 +03:00
Igor Sysoev 80e8ce8322 A number of engine connections is decreased on connection close. 2017-11-27 17:52:28 +03:00
Andrey Zelenkov 863377441b Tests: added basic infrastructure. 2017-11-21 20:51:21 +03:00
Andrey Zelenkov 78a77c3e38 Tests: move existing tests to "src" folder. 2017-11-21 18:55:28 +03:00
Valentin Bartenev 89a1c66dd0 Fixed crash on invalid JSON number. 2017-11-21 18:41:43 +03:00
Max Romanov 6bbed85899 Fixing Coverity warnings.
CID 200496
CID 200494
CID 200490
CID 200489
CID 200483
CID 200482
CID 200472
CID 200465
2017-11-20 17:08:29 +03:00
Max Romanov fa76ea700f Fixing racing condition in request.msgs usage. 2017-10-27 11:05:37 +03:00
Max Romanov 1d11f8cfbb Fixing Go program crash.
Go request registration should be removed before C request memory freed.

C request address used as a key in Go map.  Freed memory can be instantly
reused for other request and older request registration should removed at this
point to avoid collisions.
2017-10-27 11:05:22 +03:00
Max Romanov 51396fea83 Checking the result of shared memory buffer allocation.
This closes #57 issue on GitHub.
2017-10-25 15:09:07 +03:00
Valentin Bartenev 5ed4d7b9dc Avoiding compilation on systems with no working shared memory. 2017-10-25 14:57:18 +03:00
Valentin Bartenev 03e18cf42f Fixed change log for version 0.2.
Records about Go were added by mistake.
The relevant patches haven't been committed yet.
2017-10-23 21:12:12 +03:00
Igor Sysoev 9f9a708ed1 Using the single source of Unit version. 2017-10-20 17:52:04 +03:00
Igor Sysoev 2837d520bb Version bump. 2017-10-20 17:48:38 +03:00
Igor Sysoev a493675dc6 Added tag 0.2 for changeset b09757e4984e 2017-10-19 18:33:48 +03:00
Andrei Belov 156877f3c9 Introduced deb packages building tools. 2017-10-19 18:23:32 +03:00
Andrei Belov eabe25d98e Introduced rpm packages building tools. 2017-10-19 18:23:31 +03:00
Max Romanov c8a8a7c212 Fixing Go package build.
Go package build was broken by change 365:28b2a468be43.
2017-10-19 18:20:08 +03:00
Igor Sysoev f9f852008f Added version 0.2 CHANGES. 2017-10-19 17:54:29 +03:00
Andrei Belov 8ca14503b7 Added changelogs generation tools. 2017-10-19 17:48:58 +03:00
Valentin Bartenev e7d81186b5 Fixed controller restarting.
Previously, stored configuration wasn't reread on controller
process restart, which resulted in segmentation fault.
2017-10-19 17:43:54 +03:00
Max Romanov fc6520d722 Keep application worker until response for all requests received. 2017-10-19 17:37:26 +03:00
Max Romanov b3aab8c66f Filtering process to keep connection.
- Main process should be connected to all other processes.
- Controller should be connected to Router.
- Router should be connected to Controller and all Workers.
- Workers should be connected to Router worker thread ports only.

This filtering helps to avoid unnecessary communication and various errors
during massive application workers stop / restart.
2017-10-19 17:37:19 +03:00
Max Romanov 6031c63225 Introducing mmap_handler to count references to shared memory.
"All problems in computer science can be
                           solved by another level of indirection"

                                                   Butler Lampson

Completion handlers for application response buffers executed after
sending the data to client.  Application worker can be stopped right
after send response buffers to router.  Worker stop causes removal
of all data structures for the worker.

To prevent shared memory segment unmap, need to count the number of
buffers which uses it.  So instead of direct reference to shared
memory, need to reference to intermediate 'handler' structure with
use counter and pointer to shared memory.
2017-10-19 17:37:02 +03:00
Max Romanov 6532e46465 Supporting concurrent shared memory fd receive in router.
Two different router threads may send different requests to single
application worker.  In this case shared memory fds from worker
to router will be send over 2 different router ports.  These fds
will be received and processed by different threads in any order.

This patch made possible to add incoming shared memory segments in
arbitrary order.  Additionally, array and memory pool are no longer
used to store segments because of pool's single threaded nature.

Custom array-like structure nxt_port_mmaps_t introduced.
2017-10-19 17:36:56 +03:00
Max Romanov 6fd465f9d2 Introducing src_pid for mmap header for accurate buf completion.
This allows to use shared memory to communicate with main process.

This patch changes shared memory segment format and breaks compatibility
with older modules.
2017-10-19 17:36:45 +03:00
Valentin Bartenev 39fd38a948 Fixed matching of empty version. 2017-10-19 17:26:56 +03:00
Igor Sysoev 0833074f30 Fixed the bug introduced in the previous changeset. 2017-10-19 17:22:33 +03:00
Igor Sysoev 3c6edead25 Added the debug option to module compatibility vector. 2017-10-18 18:05:51 +03:00
Igor Sysoev 67c066b026 Router: fixed segfault after configuration change. 2017-10-18 18:05:47 +03:00
Igor Sysoev 09ef66d39c Storing memory cache slot hint inside nxt_sockaddr_t. 2017-10-17 16:22:38 +03:00
Valentin Bartenev 1c6d4d8cff Basic validation errors. 2017-10-10 19:46:58 +03:00