- Aug 12, 2015
-
-
Konstantin Osipov authored
-
- Jul 23, 2015
-
-
Konstantin Osipov authored
Implement a generic inter-cord communication bus and use it in separating network I/O and transaction processor. Split all request processing work into network thread part and transaction processor thread part, and make these parts multi-threading safe. Generalize fiber pool into an own data structure and API. Misc cleanups.
-
- Jul 17, 2015
-
-
Konstantin Osipov authored
Refactor iobuf and extract ibuf/obuf into small allocators library. Fix leaking obuf_destroy() (some slabs could be leaked by destroy). Introduce rename to follow the style of small allocators library.
-
- Jul 09, 2015
-
-
Konstantin Osipov authored
-
- Jul 01, 2015
-
-
Roman Tsisyk authored
+ Rewrite msgpackffi to use ibuf to use ibuf for temporary allocations + Rewrite socket:sysread() to use ibuf for temporary allocations + Rewrite socket:read() and socket:write() to use ibuf + Add socket:sysread(char *, size) and socket:syswrite(const char *, size)
-
- Jun 25, 2015
-
-
Roman Tsisyk authored
-
- Jun 23, 2015
-
-
Konstantin Osipov authored
Implement a cap on the size of the worker fiber pool in iproto (1024 fibers by default). Don't maintain too many fibers in the fiber cache of iproto.
-
- Jun 22, 2015
-
-
Konstantin Osipov authored
Correct the assertion to match the logic of the code.
-
- Jun 17, 2015
-
-
Konstantin Osipov authored
Chagne iobuf to use slab_cache directly, bypassing an intermediate allocation layer - this is necessry to make iobuf multi-threading safe.
-
- Jun 16, 2015
-
-
Konstantin Osipov authored
Introduce mpstream API to lua-msgpack encoder, which allows it to encode msgpack into any memory source. The streaming API should make it possible to encode even directly to network. Patch region allocator to support the new API. Patch iobuf/obuf output buffer of iproto to support the new API.
-
- Jun 04, 2015
-
-
Konstantin Osipov authored
- encapsulate iproto configuration into iproto module API - iobuf: change the module to be thread-safe. - iobuf: rename obuf_ensure() to obuf_reserve() as is conventional with the reset of API. - iobuf: change ibuf to use slab cache directly, bypassing the region allocator - iobuf: consistently use int for obuf/obuf_svp iov pos and obuf_iovcnt - iobuf: remove iobuf_flush - iobuf: add iobuf pin/unpin API in preparation for iproto-in-a-thread - iobuf: don't trust iov_len as an end marker in obuf_reset() There is a chance (although currently it's never used) that one of the vectors is allocated, but not used, and the next vector of a larger size is used. In that case reset loop may stop prematurely.
-
- Nov 18, 2014
-
-
Konstantin Osipov authored
Fix a bug in iovec_join which would overwrite data of the first iovec with subsequent iovecs. Double the default buffer size.
-
- Oct 21, 2014
-
-
Roman Tsisyk authored
-
- Oct 17, 2014
-
-
Roman Tsisyk authored
-
Roman Tsisyk authored
-
- May 13, 2014
-
-
Konstantin Osipov authored
* Remove a bogus message at the start of FindLibUUID.cmake. * Move cluster_add_node to cluster. * Extract UUID API into a (potentially) platform-independnent header tt_uuid. * Add error codes for error messages used in UUID generation, triggers and consistency checks. * Cleanup.
-
- Apr 14, 2014
-
-
Konstantin Osipov authored
iobuf_init() needs to be called regardless of whether iproto is initialized or not. Do it. Make provisions to make it possible to update readahead on the fly.
-
- Mar 26, 2014
-
-
Konstantin Osipov authored
In preparation of removal of confetti and switching solely to Lua-based configuration file, reduce dependencies on struct tarantool_cfg and reorder server initialization, so that it can happen after the event loop has already been started.
-
- Feb 20, 2014
-
-
Konstantin Osipov authored
Marshall replication using the primary port. Split iproto requests into two categories: DML and admin. Change PING request code to 64, to lay within admin request range. Perform administrative requests synchronously, without pushing them into an event queue. Add a new administrative request, IPROTO_SUBSCRIBE. Use dynamic memory for struct iproto_request. Introduce memory management. Remove replication_port from the configuration file and update tests. Fix the test runner so that it correctly generates replication_source to point to the primary port. Add variable arguments to IllegalParams. Move replia-related recovery methods to a new header, replica.h. Remove a debug printout from box.net.lua Update tests.
-
- Dec 23, 2013
-
-
Konstantin Osipov authored
-
- Dec 16, 2013
-
-
Konstantin Osipov authored
Move towards a uniform include scheme where header files are stored along with the sources files, in the same directory. We had to begin to use this scheme thanks to use of subprojects, and a mix of two approaches turns the code base into a mess.
-
- Dec 03, 2013
-
-
Konstantin Osipov authored
msgpuck is an external project and hosts its headers within the same directory which contains its C files. Therefore, for msgpuck, we have to add src/lib to the header search path, whether we want it or not. Since it's there anyway, kill include/lib and move all headers of all other stand-alone libraries to their respective directories in lib/. include_directories(src/) is a total blasphemy, and is thus removed.
-
- Oct 13, 2013
-
-
Konstantin Osipov authored
Instead of palloc allocator use a member of small allocators family, region_alloc. The plan is to remove salloc as well, and switch entire tarantool to libsmall. Fix a race condition in replication/swap.test, discovered with the new allocator.
-
- Jun 20, 2013
-
-
Konstantin Osipov authored
Rename tarantool_pthread.h to tt_pthread.h This is a pre-requisite for addition of Perl stored procedures.
-
- Jun 04, 2013
-
-
Roman Tsisyk authored
-
- 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.
-
- Feb 05, 2013
-
-
Roman Tsisyk authored
-
- Dec 17, 2012
-
-
Konstantin Osipov authored
-
- Nov 20, 2012
-
-
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 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.
-
- Oct 25, 2012
-
-
Konstantin Osipov authored
Change sio_advance_iov to never modify iov vector in place. This allows for reuse of this function in a raw event loop, without fibers. Minor cleanups. Make memcached/noreply.test less race prone: flush all command is running in the event loop, and sometimes it doesn't get a chance to finish before we issue the next command.
-
- Oct 23, 2012
-
-
Konstantin Osipov authored
-
Konstantin Osipov authored
Get rid of an artificial wrapper around libev's ev_io object. This allows for more code reuse.
-
- Oct 14, 2012
-
-
Konstantin Osipov authored
Change memcached, admin and iproto connection to use the buffered IO. Make coio_writev accept a hint about the total size. Remove fiber iov.
-