Skip to content
Snippets Groups Projects
  1. Apr 05, 2023
  2. Apr 03, 2023
  3. Mar 31, 2023
  4. Mar 30, 2023
    • Nikolay Shirokovskiy's avatar
      prbuf: remove dead code · 9fcafbd1
      Nikolay Shirokovskiy authored
      Remove parts that used before flightrec reader API is added.
      
      - fix test_max_record_size case of prbuf unit test to use reader from
        file
      - drop prbuf reader from buffer in memory
      - drop prbuf Lua FFI interface
      
      Follow up: https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      9fcafbd1
    • Nikolay Shirokovskiy's avatar
      prbuf: fix unaligned memory access in reader · 73e59094
      Nikolay Shirokovskiy authored
      Found by EE CI in release asan in flightrec test which uses prbuf.
      Change prbuf test so that the issue is tested in CE where the prbuf code
      resides.
      
      Follow-up https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_DOC=bug fix
      NO_CHANGELOG=unreleased bug fix
      73e59094
    • Vladimir Davydov's avatar
      memtx: introduce read view statistics · a75f4b7e
      Vladimir Davydov authored
      Closes #8501
      
      @TarantoolBot document
      Title: Document memtx read view statistics
      
      New entries have been added to `box.stat.memtx()` output:
      
      ```
      tarantool> box.stat.memtx().data
      ---
      - garbage: 0
        total: 24986
        read_view: 0
      ...
      
      tarantool> box.stat.memtx().index
      ---
      - read_view: 0
        total: 933888
      ...
      ```
      
      `data` shows how much memory is allocated for memtx tuples:
       - `data.total` - total amount of memory allocated for data tuples.
         This includes `data.read_view` and `data.garbage` plus tuples that
         are actually stored in memtx spaces.
       - `data.read_view` - memory held for read views.
       - `data.garbage` - memory that is unused and scheduled to be freed
         (freed lazily on memory allocation).
      
      `index` shows how much memory is allocated for memtx index extents:
       - `index.total` - total amount of memory allocated for indexing data.
         This includes `index.read_view` plus memory used for indexing tuples
         that are actually stored in memtx spaces.
       - `index.read_view` - memory held for read views.
      
      All numbers are given in bytes.
      
      `data.read_view` and `index.read_view` include memory allocated both for
      system read views (snapshot, replication) and user read views (EE-only).
      They should be non-zero only if there are open read views. To list all
      open read views, use `box.read_view.list()`.
      a75f4b7e
  5. Mar 29, 2023
    • Andrey Saranchin's avatar
      read_view: introduce pagination methods · 1e02e050
      Andrey Saranchin authored
      The commit adds new read view methods needed for pagination. Also, the
      check that tuple is not nil is dropped for the sake of consistency - we
      will omit this check in read view because it is incomplete anyway and
      the error message looks fine without it.
      
      Part of tarantool/tarantool-ee#285
      
      NO_CHANGELOG=in EE
      NO_DOC=in EE
      1e02e050
    • Andrey Saranchin's avatar
      box: factor out iterator_position logics · 32fe9b17
      Andrey Saranchin authored
      Since we are going to implement pagination for read_view, we need to
      factor out iterator_position logics to avoid duplication.
      
      Part of tarantool/tarantool-ee#285
      
      NO_TEST=refactoring
      NO_CHANGELOG=refactoring
      NO_DOC=refactoring
      32fe9b17
    • Andrey Saranchin's avatar
      memtx: validate only cmp_def parts in pagination · 275130ff
      Andrey Saranchin authored
      Currently, we check that tuple passed as position fits space format.
      However, for pagination purposes, it's enough to validate only parts of
      tuple that are used in cmp_def. And, it allows not to use space format -
      we will need it in read view. So the patch replaces tuple validation with
      validation of its cmp_def parts only.
      
      Closes #8511
      Part of tarantool/tarantool-ee#285
      
      NO_DOC=bugfix
      275130ff
    • Andrey Saranchin's avatar
      key_def: introduce tuple_validate_key_parts_raw helper · f8bb4ec4
      Andrey Saranchin authored
      We are going to validate only key parts of passed tuple in pagination.
      That is why the patch introduces helper that allows to do it with raw
      version of tuple.
      
      Part of #8511
      Part of tarantool/tarantool-ee#285
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      f8bb4ec4
    • Nikolay Shirokovskiy's avatar
      misc: add parts for flightrec reader in EE · 39a96aa3
      Nikolay Shirokovskiy authored
      This includes:
      - Call flightrec Lua C initialization.
      - Stop exporting in public API flightrec configuration function. It
      is intended for private use.
      - Export iproto_key_translation for representing requests/response
      records.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_TEST=preparation for EE changes
      NO_CHANGELOG=preparation for EE changes
      NO_DOC=preparation for EE changes
      39a96aa3
    • Nikolay Shirokovskiy's avatar
      say: introduce say_log_level_str · 84a2cf60
      Nikolay Shirokovskiy authored
      It is intended to be used in EE. As we introduce this function it is
      a good moment to drop level_to_char and level_to_string. They have too
      little functionality.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      84a2cf60
    • Nikolay Shirokovskiy's avatar
      prbuf: fix losing records on prepare on wrap · c387250a
      Nikolay Shirokovskiy authored
      There is an issue in prbuf_prepare on branch when we need to
      wrap and allocate space for the record starting from the beginning of
      the data area.
      
      In the process we set end offset to 0. This means empty buffer. So if
      application is crashed after such prepare but before commit buffer will
      have no records. This is a bug.
      
      But actually we don't have to reset end to 0 unless we preparing for
      very big record which will occupy almost all buffer. In this case there
      is really no records left after preparation. Otherwise if we don't
      change end offset buffer will be valid and records will be there.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_DOC=bugfix
      NO_CHANGELOG=minor
      c387250a
    • Nikolay Shirokovskiy's avatar
      prbuf: add reader from file · c7ed03de
      Nikolay Shirokovskiy authored
      New prbuf reader API is intended to be used in flight recorder reader
      API implementation.
      
      Currently prbuf has API to read records memory buffer. It is used for
      testing purposes only. We aim to drop this reader eventually. This patch
      in particular switch prbuf unit test to use new reader API.
      
      This patch also cleanups prbuf unit test besides merely adding tests
      for new and missing cases. This includes:
      
      - Using structured test plan. Now test plan is not some number which
      updated after running the test. With structure it can be written down
      deliberately.
      - Buffer/payload sizes in main test are tuned to test all possible
      unused space at the end of the buffer cases.
      - Check actual number of records in buffer. Otherwise we may not notice
      having no records at all for example.
      - Factor out common parts to helper functions/tests.
      - Print actual object in tests where it may help tests debugging.
      
      Part of https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      c7ed03de
    • Nikolay Shirokovskiy's avatar
      core: add new FileFormatError · 48ed9c4d
      Nikolay Shirokovskiy authored
      Part of https://github.com/tarantool/tarantool-ee/issues/319
      
      NO_CHANGELOG=internal
      NO_DOC=internal
      48ed9c4d
    • Gleb Kashkin's avatar
      console: fix :endswith() err in tntctl connection · 796e4b5b
      Gleb Kashkin authored
      There used to be a rare error when failed to connect via tarantoolctl to
      listening cartridge console. It was caused by unclear
      console.local_print() contract. Starting from gh-7031 fix, the function
      assumed string-only arguments, while in some cases cdata error was
      passed.
      
      Now console.local_print() prints all non-string arguments as is, without
      modifying potential local_eos.
      
      Closes #8374
      
      NO_DOC=bugfix
      NO_TEST=very hard to test
      796e4b5b
  6. Mar 28, 2023
    • Sergey Bronnikov's avatar
      ci: build doxygen doc without full-ci label · 07d686dc
      Sergey Bronnikov authored
      Follows up #8194
      
      NO_CHANGELOG=ci
      NO_DOC=ci
      NO_TEST=ci
      07d686dc
    • Sergey Bronnikov's avatar
      doxygen: update config · 660b8633
      Sergey Bronnikov authored
      - remove obsoleted parameters
      - return non-zero exit code when warnings are found. Doxygen has an
        option that set exit code to non-zero on warnings, available in
        Doxygen 1.9.0+, see [1] and [2].
      
      1. https://github.com/doxygen/doxygen/issues/8023
      2. https://www.doxygen.nl/manual/config.html
      
      NO_CHANGELOG=doxygen config
      NO_DOC=doxygen config
      NO_TEST=doxygen config
      
      Follows up #8194
      660b8633
    • Sergey Bronnikov's avatar
      module api: fix formatting comments for Doxygen · 30be5017
      Sergey Bronnikov authored
      - remove < and > around function names to make them resolvable
      - place @sa and \sa to the new lines and remove round parenthesis around
      - add missed dots
      - added comments for box_tuple_upsert, box_tuple_update, luaT_pusherror
        etc.
      - replace \example tags with \code and \endcode, because \example
        requires a file name with example, when \code allows to place a code
        inline
      - comments for macros alignof and likely/unlikely looks a bit ugly,
        but I couldn't find a better way to resolve doxygen warning
      - remove dashes after @param
      - corrected comments for box_tuple_update() and box_tuple_upsert()
      
      Closes #8194
      
      NO_CHANGELOG=fix doxygen
      NO_DOC=fix doxygen
      NO_TEST=fix doxygen
      30be5017
    • Vladimir Davydov's avatar
      memtx: use MemtxAllocator stats for box.info.memory · bd4c6675
      Vladimir Davydov authored
      We need MemtxAllocator stats for reporting read view memory usage, see
      https://github.com/tarantool/tarantool-ee/issues/143. Let's also use
      them for reporting data memory usage in box.info.memory() for
      consistency and add a test.
      
      It looks more correct that using allocator stats for reporting data
      memory usage because box.info.memory() is supposed to show high level
      stats. For low level allocator stats we have box.slab.info().
      
      Note that a memtx tuple may be held by tuple_bless so we have to reset
      it by creating a new tuple in Lua before checking memory usage.
      
      NO_DOC=refactoring
      NO_CHANGELOG=refactoring
      bd4c6675
    • Vladimir Davydov's avatar
      memtx: add MemtxAllocator statistics · 88a38db9
      Vladimir Davydov authored
      We account three metrics:
      
       - used_total - total size of allocated memory
       - used_rv - size of memory held for read views
       - used_gc - size of memory freed on demand
      
      We'll need them to report memtx read view statistics.
      
      While we are at it, switch the test to TAP and drop the result file.
      
      Needed for https://github.com/tarantool/tarantool-ee/issues/143
      
      NO_DOC=internal
      NO_CHANGELOG=internal
      88a38db9
  7. Mar 27, 2023
  8. Mar 24, 2023
Loading