Skip to content
Snippets Groups Projects
  1. May 25, 2017
    • Georgy Kirichenko's avatar
      Add fiber attributes · 19cda0fc
      Georgy Kirichenko authored
      Fiber attributes are a way to specify parameters that is different
      from the default. When a fiber is created using fiber_new_ex(),
      an attribute object can be specified to configure custom values for
      some options. Attributes are specified only at fiber creation time;
      they cannot be altered while the fiber is being used.
      
      Currently only stack_size attribute is supported. Fibers with
      non-default stack size won't be recycled via fiber pool.
      
      API overview:
      
      * fiber_new_ex() creates a fiber with custom attributes.
      * fiber_attr_new()/fiber_attr_delete() creates/destroys attributes.
      * fiber_attr_setstacksize()/fiber_attr_getstacksize() sets/gets
        the fiber stack size.
      * fiber_self() returns current running fiber.
      
      All new functions are available from public C API for modules.
      
      See #2438
      19cda0fc
    • Roman Tsisyk's avatar
      Fix "attempt to redefine 'nan_ultra_hack'" · 441a40c4
      Roman Tsisyk authored
      Generate random names for temporary FFI structures.
      
      Follow up #1701
      441a40c4
  2. May 24, 2017
    • Vladislav Shpilevoy's avatar
      vinyl: fix creation replace from upsert in vinyl · 653c9b96
      Vladislav Shpilevoy authored
      During converting upsert into replace the
      vy_stmt_new_replace_from_upsert doesn't copy field_map of the
      source statement. It led to segfault in comparators during access
      to the broken field_map.
      
      Fixes #2461
      653c9b96
    • Vladislav Shpilevoy's avatar
      Allow to use NaN on indexed positions · a5d17b17
      Vladislav Shpilevoy authored
      Now Tarantool doesn't support NaN's on indexed positions. Lets
      allow their indexing.
      
      According to the IEEE 754 the double has the following format:
      
      +------+----------+----------+
      | sign | exponent | fraction |
      +------+----------+----------+
       1 bit   11 bit     52 bit
      
      If the exponent is  0x7FF, the value is special one whether of sign bit.
      Special value can be NaN, +inf or -inf.
      
      If the fraction == 0, the value is inf, which sign depends on the first
      bit.
      
      If the first bit of the fraction is 1, the value is quiet NaN (qNaN),
      and else the signaling NaN (sNaN).
      
      Lets compare their in the order:
      sNaN < qNaN < -inf < normal number < +inf;
      sNaN == sNaN;
      qNaN == qNaN;
      aNaN != qNaN;
      -inf == -inf;
      +inf == +inf;
      
      Closes #1701
      a5d17b17
    • Vladislav Shpilevoy's avatar
      3f393ceb
    • Vladislav Shpilevoy's avatar
      Fix error in tuple_format_dup · 871296f2
      Vladislav Shpilevoy authored
      871296f2
    • Vladimir Davydov's avatar
      vinyl: fix scheduler hang if quota is exceeded but there's nothing to dump · f86a4da2
      Vladimir Davydov authored
      The quota may be exceeded even if all in-memory trees are empty, because
      quota is used by pending transactions. If this happens, the scheduler
      will keep dumping empty trees in a tight loop w/o yielding, thus not
      even letting pending transactions to fail on timeout. Fix this by adding
      a sanity check to vy_scheduler_peek_dump() assuring there's something we
      can dump before proceeding to scheduling a task.
      f86a4da2
    • Vladimir Davydov's avatar
      vinyl: remove space reference from vy_index · 13ec18c7
      Vladimir Davydov authored
      vy_index->space is zeroed on index drop, so we have to be extremely
      careful about how to use it, e.g. we can't dereference it in a dump
      task, while currently we do, which can result in a crash. Actually,
      vy_index->space is only used for retrieving the primary key, so having
      a pointer to the whole space in a vy_index is kinda superfluous - a
      primary key would be enough. That being said, this patch replaces the
      space field with the pk field in the vy_index struct. vy_index->pk is
      referenced by each secondary index so it's safe to use it wherever we
      want. Also, add a test dropping a space in the middle of dump - w/o
      this patch it leads to a crash.
      13ec18c7
    • Vladimir Davydov's avatar
      xlog: add missing diag_set · 9ef7767e
      Vladimir Davydov authored
      9ef7767e
    • Vladimir Davydov's avatar
      bitset: do not fail bitset_index_create · 2281891c
      Vladimir Davydov authored
      There's no point in preallocating memory on creation of a bitset_index
      object, it only encumbers usage of it in functions that cannot fail,
      e.g. on memtx index creation.
      2281891c
    • Georgy Kirichenko's avatar
      xlog: fix handling of multiple EOF markers · ca2e3bb3
      Georgy Kirichenko authored
      In some cases a xlog file can have some data after EOF marker.
      Set XLOG_CURSOR_EOF flag for xlog cursor only when there are no
      more data after EOF marker.
      
      Closes #2460
      ca2e3bb3
    • Georgy Kirichenko's avatar
      xlog: fix error handling in Lua xlog reader · b487e265
      Georgy Kirichenko authored
      Check properly the return value of a xlog_cursor_find_tx_magic().
      
      See #2460
      b487e265
    • Georgy Kirichenko's avatar
      xlog: fix unsigned overflow in xlog_open() · 72db20a9
      Georgy Kirichenko authored
      Negating unsigned size_t value and then casting it to signed off_t type
      is very bad idea. On 32-bit platforms size_t is unsigned 32-bit type,
      whereas off_t is signed 64-bit type.
      
      See #2460
      72db20a9
    • Vladimir Davydov's avatar
      Fix vinyl/coalesce test hang · e023cb02
      Vladimir Davydov authored
      Slices make range size estimation inaccurate. This may lead to the
      coalesce test hang waiting for all ranges to be coalesced in case the
      estimated sum range size turns out to be greater than the threshold
      (range_size / 2). To make sure it never happens, let's make the test
      more aggressive: let it not only delete 90% keys, but also strip the
      rest of padding.
      e023cb02
    • Konstantin Osipov's avatar
      log: implement log_verbose and VERBOSE log level. · b0551ae6
      Konstantin Osipov authored
      We don't have any intermediate log level between INFO and DEBUG.
      INFO level should be used for rare events, such as becoming a
      master or accepting a replica join. INFO is the default level.
      
      We lack a log level for "hard to debug" situations, usable
      by system administrators.
      
      Introduce a new new log level for this purpose, VERBOSE,
      for verbose output.
      
      This change should not affect any existing installations.
      
      Update module-api.c test.
      
      Fixes gh-2467.
      b0551ae6
  3. May 23, 2017
  4. May 22, 2017
  5. May 19, 2017
  6. May 18, 2017
  7. May 17, 2017
    • Vladimir Davydov's avatar
      vinyl: allow optional keys in vylog · ea0d6471
      Vladimir Davydov authored
      Currently, only keys from vy_log_key_mask[type] may be present in a
      record of the given type. Extra keys will result in an error. In
      order to rework space truncate, we will have to add a new key for
      VY_LOG_CREATE_INDEX record (space_version). To be able to start from
      vylog generated by an older version, we need to allow extra keys. So
      this patch deletes vy_log_key_mask[] and makes vy_log_record_encode()
      encode only those keys whose value is different from the default one
      (similarly to request_encode()). Checking for mandatory keys is now up
      to vy_recovery_process_record() (currently there's the only that needs
      to be checked - VY_LOG_KEY_DEF)
      ea0d6471
    • Vladimir Davydov's avatar
      vinyl: don't use data left from previous vylog records · cd4ed98b
      Vladimir Davydov authored
      vy_recovery_iterate() doesn't clean vy_log_record before proceeding to
      the next log entry. As a result, a run record passed to the callback by
      vy_recovery_iterate() contains extra info left from the index this run
      is for: index_lsn, index_id and space_id. We use this in gc and backup
      callbacks to format file name. The problem is vy_recovery_iterate() is
      also used internally for log rotation. Including extra keys in records
      doesn't result in writing them to the log file on rotation, because per
      each record type we have a mask of keys corresponding to the record
      (vy_log_key_mask). In order to allow optional keys in vylog, the
      following patch will change the meaning of the mask so that it only
      contains mandatory keys, while a key will be written to the log only if
      its value differs from the default (similarly to request_encode). Thus,
      to avoid writing keys not relevant to a record type we need to clean
      vy_log_record within vy_recovery_iterate() before jumping to the next
      record. So this patch weans gc and backup from exploiting this feature -
      let them save index_id and space_id in the context, as we do on
      replication and recovery.
      cd4ed98b
    • Vladislav Shpilevoy's avatar
      Implement info_append_double · 24707c0c
      Vladislav Shpilevoy authored
      Info_append_double is needed to print vinyl index.info.bloom_fpr later.
      24707c0c
    • Vladimir Davydov's avatar
      vinyl: zap vy_index::path · 124bac9a
      Vladimir Davydov authored
      It was helpful when a vinyl index could have a custom path. Currently,
      it's forbidden, so we can format index path in place.
      124bac9a
    • Vladimir Davydov's avatar
      vinyl: zap vy_index::name · ae80dbc1
      Vladimir Davydov authored
      We can format it in place when needed.
      ae80dbc1
Loading