Skip to content
Snippets Groups Projects
  1. Aug 12, 2015
  2. Jul 23, 2015
    • Konstantin Osipov's avatar
      iproto: move networking into a separate thread · 518b570c
      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.
      518b570c
  3. Jul 17, 2015
  4. Jul 09, 2015
  5. Jul 01, 2015
    • Roman Tsisyk's avatar
      Add bindings for struct ibuf and rewrote sockets to use it. · 75af9e35
      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)
      75af9e35
  6. Jun 25, 2015
  7. Jun 23, 2015
  8. Jun 22, 2015
  9. Jun 17, 2015
  10. Jun 16, 2015
    • Konstantin Osipov's avatar
      lua-msgpack: introduce API to encode using any memory source · 1d80838f
      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.
      1d80838f
  11. Jun 04, 2015
    • Konstantin Osipov's avatar
      misc: iproto, iobuf cleanups · 1b1d34df
      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.
      1b1d34df
  12. Nov 18, 2014
  13. Oct 21, 2014
  14. Oct 17, 2014
  15. May 13, 2014
    • Konstantin Osipov's avatar
      async-master-master review fixes · 5a454e84
      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.
      5a454e84
  16. Apr 14, 2014
  17. Mar 26, 2014
  18. Feb 20, 2014
    • Konstantin Osipov's avatar
      Remove replication_port · 9dadc3da
      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.
      9dadc3da
  19. Dec 23, 2013
  20. Dec 16, 2013
  21. Dec 03, 2013
    • Konstantin Osipov's avatar
      Since msgpuck is an external project, remove #include <lib/library/header.h> · f33c1c87
      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.
      f33c1c87
  22. Oct 13, 2013
    • Konstantin Osipov's avatar
      Remove palloc. Use region_alloc instead. · b01d75b1
      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.
      b01d75b1
  23. Jun 20, 2013
  24. Jun 04, 2013
  25. Feb 09, 2013
    • Konstantin Osipov's avatar
      Fix two bugs in the new async I/O. · fafa3465
      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.
      fafa3465
  26. Feb 05, 2013
  27. Dec 17, 2012
  28. Nov 20, 2012
    • Konstantin Osipov's avatar
      Implement a fully asynchronous input handling in iproto protocol. · aa8e343f
      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.
      aa8e343f
  29. Nov 13, 2012
  30. Oct 25, 2012
    • Konstantin Osipov's avatar
      Change the piecemeal non-blocking writev() algorithm. · 1af7b0b9
      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.
      1af7b0b9
  31. Oct 23, 2012
  32. Oct 14, 2012
Loading