- Feb 09, 2013
-
-
Konstantin Osipov authored
There were two cases when the new async I/O worked incorrectly. The problems only revealed themselves under specific concurrency circumstances. In one case, the client would get a mix of pieces of different packets (responses). The reason for this was that, when selecting which output buffer to write to the client, the flushing algorithm used to select whichever of two buffers, associated with a session, had data to flush. This worked OK as long as the entire contents of the buffer could be written in one writev() call. But when writev() would only be able to write a part of the buffer, the next writev() could already be done with another buffer, thus producing a mix of *partial* writes from both buffers. Between two buffers used for a session, one is always newer than the other (contains responses to requests which came in earlier). So basically the bug was that we would select a newer buffer for flushing, while there were still unhandled requests in the older buffer. One approach to a fix would be to, once started, keep writing the newer buffer until there is nothing to write in it. The actual fix chooses a simpler approach: to never begin with a newer buffer, until the older one is completely written. Thus, there is never reordering of output between two output buffers, only within a single buffer. The second bug was caused by wrong calculation of write offset for iproto header. When iproto_header would fall on the border of two iov vectors, obuf_book would rightfully discard the tail of the first iov vector, and "position" the header at the beginning of the second vector. However, the savepoint used to memcpy() the output would still point at the first vector, and the header would be (partially) written at the end of the first vector, not at the beginning of of the second. This led to a) write beyond allocated memory b) loss of a piece of a packet (effect seen by the client). The fix is to correctly record the write position when making a booking. obuf_book signature is changed respectively. No test cases since the bug is only spottable under certain concurrency circumstances (a single CPU box, client/server I/O). @todo: add unit tests.
-
- Jan 17, 2013
-
-
Konstantin Osipov authored
-
- Jan 11, 2013
-
-
Roman Tsisyk authored
-
- Jan 09, 2013
-
-
Konstantin Osipov authored
Since connect/disconnect events in iproto run outside fiber context, queue execution of on_connect/on_disconnect triggers through the request queue. Generalize the request queue for that purpose. Implement a framework for on_connect/on_disconnect triggers and Lua bindings for it. Add tests and docs.
-
- Jan 02, 2013
-
-
Konstantin Osipov authored
-
- Dec 24, 2012
-
-
Konstantin Osipov authored
Move Box API declarations to box.h. Make box.h a public header. Add comments to box functions. Rename fuctions accordingly. Make includes for connector/c more local.
-
- Dec 20, 2012
-
-
Konstantin Osipov authored
-
- Dec 19, 2012
-
-
Konstantin Osipov authored
-
- Dec 17, 2012
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
bigbes authored
-
- Dec 13, 2012
-
-
Konstantin Osipov authored
-
- Nov 28, 2012
-
-
Konstantin Osipov authored
-
- Nov 26, 2012
-
-
Konstantin Osipov authored
-
Roman Tsisyk authored
-
Roman Tsisyk authored
-
Roman Tsisyk authored
-
- Nov 23, 2012
-
-
Roman Tsisyk authored
are not configured in the sequential order".
-
Dmitry E. Oboukhov authored
-
- Nov 22, 2012
-
-
bigbes authored
-
Dmitry Simonenko authored
Fixing bug - absence of termcap and curses headers
-
bigbes authored
-
- Nov 21, 2012
-
-
Roman Tsisyk authored
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
bigbes authored
-
Dmitry E. Oboukhov authored
-
- Nov 20, 2012
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Konstantin Osipov authored
Move the block with @finally into an own function.
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Konstantin Osipov authored
-
Konstantin Osipov authored
Implements https://blueprints.launchpad.net/tarantool/+spec/fiber-specialization After this patch, all requests even within the same session are handled asynchronously, and responses are sent to the client as soon as they become ready, regardless of the request position in the input buffer. This also changes the internal implementation of iproto from a "one fiber per connection" pattern to "fiber work crew" pattern. This approach significantly reduces the amount of context switches between fibers. There is a bug in gcc Objective C support and nested exception, with which an exception passes by a @catch clause if there are nested @finally clauses. This patch doesn't work around this bug, so if the server is compiled with gcc and the client closes its side of the socket without fully reading the input, the server terminates. The server needs to be compiled with clang for now to work around this bug.
-
- Nov 19, 2012
-
-
Dmitry Simonenko authored
-
Dmitry Simonenko authored
-
- Nov 13, 2012
-
-
Konstantin Osipov authored
Do not modify output buffer between yield points: in net-split, multiple fibers work on the same session, and append output to the same output buffer.
-
- Nov 08, 2012
-
-
Roman Tsisyk authored
-
- Nov 05, 2012
-
-
Eugine Blikh authored
-